root@lap425:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libwireshark3 libwiretap3 libwsutil3 re2c
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libc6-dev-i386
The following packages will be upgraded:
libc6-dev-i386
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
8 not fully installed or removed.
Need to get 1,152 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main libc6-dev-i386 amd64 2.19-0ubuntu6.13 [1,152 kB]
Fetched 1,152 kB in 2s (531 kB/s)
(Reading database ... 322294 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.13_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.13) over (2.19-0ubuntu6.11) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.13_amd64.deb (--unpack):
trying to overwrite '/usr/include/sys/uio.h', which is also in package libc6-dev-amd64 2.19-0ubuntu6.13
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方案。
答案1
错误表明无法解压该软件包libc6-dev-i386
,因为另一个软件包中已经存在一个文件,而 apt-get 不会覆盖现有文件。
尝试覆盖“/usr/include/sys/uio.h”,它也位于软件包 libc6-dev-amd64 2.19-0ubuntu6.13 中
您可以尝试删除其中一个有问题的软件包:
sudo dpkg --force-overwrite --purge libc6-dev-i386
或者
sudo dpkg --force-overwrite --purge libc6-dev-amd64
如果这两个包都是您想要保留的其他软件包所需要的,您可以尝试安装新包并强制覆盖文件,具体方法如下这个答案:
sudo apt-get -o Dpkg::Options::="--force-overwrite" install libc6-dev-i386
注意:这可能会导致第一个安装的包出现问题。