尝试覆盖... 它也位于包[重复]中

尝试覆盖... 它也位于包[重复]中

我正在尝试做apt-get install -f -o APT::Immediate-Configure=0apt-get install -f目前对我来说不起作用......)但失败了

Unpacking libboost1.46-dev (from .../libboost1.46-dev_1.46.1-7ubuntu3_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libboost1.46-dev_1.46.1-7ubuntu3_i386.deb (--unpack):
 trying to overwrite '/usr/include/boost/aligned_storage.hpp', which is also in package libboost1.40-dev 1.40.0-4ubuntu4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

以及许多类似的错误。

还有类似的问题(12) 已经但建议的解决方案是dpkg,我不知道如何将其应用于apt-get

我该如何解决这个问题?

答案1

好吧,我现在就这么做了dpkg,但我尝试将其自动化一点。我的命令如下:

for f in $(sudo apt-get install python-gnupginterface -f | egrep "^ libboost" | cut -d: -f1); do echo $f; done | xargs sudo dpkg --purge

然后我做了一个dpkg --configure -a

然后apt-get install -f

然后apt-get autoremove

相关内容