Debian Wheezzy上的Python2.7.7与2.7.9

2024-04-19 09:48:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在我的DebianWheezy上安装Python2.7.9,我已经从Debian站点下载了.deb文件。不幸的是,现在我显然已经造成了一个bug,这是我在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',它会要求我从操作系统中删除超过2GB的内存,而我不想这样做。有什么想法吗?在


Tags: installinstalledtoget站点isdependenciesapt
2条回答

解决方法:基本上问题是

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

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

在使用Debian等发行版时,正确的方法是使用官方存储库进行两次操作,即使用apt-get install,而不是使用dpkg -i下载和安装。在

如果您直接使用dpkg,那么{}需要的重要信息将丢失。在

我给你的建议是-

1-使用手动安装的包上的dpkg -P撤消所做的更改

2-运行apt-get update

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

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

相关问题 更多 >