我想用 apt-get 安装 gnome-maps,然后出现以下错误:
Preparing to unpack .../python-setuptools_3.4.1-1_all.deb ...
Unpacking python-setuptools (3.4.1-1) over (3.3-1) ...
dpkg: error processing archive /var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb (--unpack):
trying to overwrite '/usr/lib/python2.7/dist-packages/build', which is also in package python-pyaudio 0.2.7-2+b1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/python-setuptools_3.4.1-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
它想要更新python-setuptools
包,但不知何故失败了,
apt-get -f install
apt-get clean
dpkg --configure -a
没有帮助。
当我现在尝试安装某物时,它说
sudo apt-get install sup
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:
python-setuptools : Depends: python-pkg-resources (= 3.3-1) but 3.4.1-1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我运行的是不稳定的 Debian。
/var/log/dpkg.log 给出:
2014-04-04 13:16:10 startup archives unpack
2014-04-04 13:16:10 upgrade python-setuptools:all 3.3-1 3.4.1-1
2014-04-04 13:16:10 status half-configured python-setuptools:all 3.3-1
2014-04-04 13:16:10 status unpacked python-setuptools:all 3.3-1
2014-04-04 13:16:10 status half-installed python-setuptools:all 3.3-1
2014-04-04 13:16:10 status unpacked python-setuptools:all 3.3-1
2014-04-04 13:16:11 status installed python-setuptools:all 3.3-1
完全的:关联
答案1
好吧,看起来就像apt-get
是在安装必要的依赖项之前就退出了。由于 似乎没有任何反向依赖关系python-setuptools
,我只是尝试删除它,看看会发生什么:
apt-get purge python-setuptools
如果这不起作用,那么:
dpkg -P python-setuptools
从那里您可以尝试再次安装,但从错误消息来看:
trying to overwrite '/usr/lib/python2.7/dist-packages/build', which is also in package python-pyaudio 0.2.7-2+b1
看起来包裹有问题。如果再次发生这种情况,您应该向 Debian 提交错误报告。
如果是包的问题,那么旧包应该在/var/cache/apt/archives
.你可以从那里重新安装它dpkg -i
,或者如果不是,它应该在 Debian 中testing
并且可以通过下载https://www.debian.org/distrib/packages。
一般来说,如果您正在运行unstable
,请apt-listbugs
安装该软件包。如果您尝试安装的任何软件包报告有任何严重错误,这将发出警告。还可以考虑设置一个混合testing
/unstable
系统,因为这样的问题通常会在包到达时得到解决testing
,而且您仍然可以访问不稳定的原始内容。