有时,我不得不处理由生产环境中的Python 2.5解释器运行的一些旧的Python代码。我想像开发产品一样设置开发环境,所以我需要安装python2.5
软件包系列。
当然,我可以从源代码安装,但是我真的更喜欢使用软件包,除非绝对没有办法。
但是,2.5.9软件包不包含在11.04附带的任何apt源码中。在哪里可以找到与Natty兼容的Python 2.5软件包?
更新:有效!我应该apt-get
更仔细地阅读输出:
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
因此,这是我安装Python 2.5的操作:
: josh@josh; sudo add-apt-repository ppa:fkrull/deadsnakes
: josh@josh; sudo apt-get update
: josh@josh; sudo apt-get install python2.5
[...]
The following packages have unmet dependencies:
python-minimal : Breaks: python2.5-minimal (< 2.5.5-7) but 2.5.4-1ubuntu6.1 is to be installed
python2.5 : Depends: python2.5-minimal (= 2.5.5-8~ppa2~natty3) but 2.5.4-1ubuntu6.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
: josh@josh; sudo apt-get -f install
[...]
The following extra packages will be installed:
python2.5-minimal
Recommended packages:
python2.5
The following packages will be upgraded:
python2.5-minimal
[...]
Do you want to continue [Y/n]?
[...]
Setting up python2.5-minimal (2.5.5-8~ppa2~natty3) ...
: josh@josh; sudo apt-get install python2.5
The following NEW packages will be installed:
python2.5
[...]