我认为我混合了不同的存储库包,但我无法卸载任何有冲突的包。有什么建议吗?
gunnar@gunnar-VirtualBox:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6-dev-i386
The following NEW packages will be installed:
libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 107 not upgraded.
4 not fully installed or removed.
Need to get 0 B/1,151 kB of archives.
After this operation, 6,337 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 247223 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.5) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb (--unpack):
trying to overwrite '/usr/include/gnu', which is also in package libc6-dev-amd64 2.19-0ubuntu6.5
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我认为观察到的行为是以下错误的表现:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1365375
我在上述错误报告的评论#4中提供了一种解决方法:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1365375/comments/4
为了您的方便,在此复制该帖子的文本:
To follow-up on my previous comment, I was able to work around this "broken state" in aptitude by purging the offending packages with "--force-depends":
dpkg --purge --force-depends "gcc-multilib"
dpkg --purge --force-depends "lib32z1-dev"
dpkg --purge --force-depends "libc6-dev-x32"
Now, I'm able to use "apt-get" as normal.
Hopefully, this workaround won't cause problems in the future.
不幸的是,长期的解决方案是等待 Canonical 的适当修复。
答案2
删除文件并再次/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
运行。sudo apt-get -f install
您的操作系统是 32 位的,但您的 中有libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
64 位文件。因此 32 位 Ubuntu 无法解压它并给出错误。简而言之,运行以下命令:.deb
/var/cache/apt/archives/
sudo rm /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
sudo apt-get -f install
答案3
由于/usr/include/gnu
被其他包中的文件覆盖,因此删除该包将解决您的问题。
运行以下命令来摆脱这种情况。
sudo apt-get purge libc6-dev-i386
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get install -f