Debian Wheezy 上的错误 Python 2.7.7 VS 2.7.9

Bug Python 2.7.7 VS 2.7.9 on Debian Wheezy

我想在我的 Debian Wheezy 上安装 Python 2.7.9,我已经从 Debian 站点下载了 .deb 文件。不幸的是,现在我显然已经引起了一个错误,这是我在 apt-get 升级后所拥有的:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libpython2.7 : Depends: python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed
 python2.7 : Depends: python2.7-minimal (= 2.7.9-2) but 2.7.3-6+deb7u2 is installed
             Depends: libpython2.7-stdlib (= 2.7.9-2) but it is not installable
 python2.7-dev : Depends: python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed
E: Unmet dependencies. Try using -f.

如果我尝试 'apt-get -f install',它会要求我从我的 OS 中删除超过 2GB,而我不想这样做。有什么想法吗?

使用 Debian 等发行版的正确方法是两种使用官方存储库,即使用 apt-get install 而不是使用 dpkg -i.

下载和安装

如果您直接使用 dpkgapt 需要的重要信息会丢失。

我给你的建议是-

1- 在您手动安装的软件包上使用 dpkg -P 撤消更改

2- 运行 apt-get update

3-寻找带有apt-apt-cache search python=<version>或没有版本的包。

4- 如果您没有找到想要的版本,您可以使用其他官方 Debian 存储库(将它们包含在您的 apt 源列表文件中)

以这种方式修复:基本上问题是

python2.7 (= 2.7.3-6+deb7u2) but 2.7.9-2 is installed

我已经下载了 python 版本 2.7.3-6+deb7u2 并通过简单的 dpkg -i 安装了它。自动降级