每当我尝试安装新软件时,都会收到此错误消息
"New software can't be installed, because there is a problem with the software currently installed. Do you want to repair this problem now?"
所以我检查了一下问题出在哪里,然后我得到了这个
The following packages have unmet dependencies:
libpcap0.8: Depends: libc6 (>= 2.14) but 2.19-0ubuntu6.5 is installed
libpcap0.8:i386: Depends: libc6 (>= 2.11) but 2.19-0ubuntu6.5 is installed
我谷歌了一下,发现使用下面的代码可以解决这个问题。说实话,没有。我在下面发布了输出。有人能帮我吗?
root@Beast:~# 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:
libpcap0.8:i386
The following packages will be upgraded:
libpcap0.8:i386
1 upgraded, 0 newly installed, 0 to remove and 288 not upgraded.
3 not fully installed or removed.
Need to get 0 B/108 kB of archives.
After this operation, 9,216 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 223584 files and directories currently installed.)
Preparing to unpack .../libpcap0.8_1.5.3-2_i386.deb ...
Unpacking libpcap0.8:i386 (1.5.3-2) over (1.4.0-2) ...
dpkg: error processing archive /var/cache/apt/archives/libpcap0.8_1.5.3-2_i386.deb (--unpack):
trying to overwrite shared '/usr/share/man/man7/pcap-filter.7.gz', which is different from other instances of package libpcap0.8:i386
Processing triggers for man-db (2.6.7.1-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/libpcap0.8_1.5.3-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
此外,跑步sudo apt-get autoremove
给我带来以下好处:
root@Beast:~# sudo apt-get autoremove
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:
libpcap0.8 : Breaks: libpcap0.8:i386 (!= 1.5.3-2) but 1.4.0-2 is installed
libpcap0.8:i386 : Breaks: libpcap0.8 (!= 1.4.0-2) but 1.5.3-2 is installed
E: Unmet dependencies. Try using -f.
答案1
测试一下:
打开终端,
按Ctrl++AltT
运行:
sudo -i
rm /usr/share/man/man7/pcap-filter.7.gz
rm /var/cache/apt/archives/libpcap0.8_1.5.3-2_i386.deb
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean
答案2
没关系,我修复了这个问题。我删除了位于以下位置的 libpcap0.8 文件夹的内容:
/usr/share/doc/libpcap0.8
然后我运行代码apt-get -f install
,包安装正确。
我希望这能帮助其他遇到同样问题的人。