无法删除 libpcap0.8 包

无法删除 libpcap0.8 包

运行时出现错误apt-get remove

root@System:~/Downloads# sudo apt-get remove  
The following packages have unmet dependencies:
 libpcap0.8 : Breaks: libpcap0.8:i386 (!= 1.4.0-2) but 1.5.3-2 is installed
 libpcap0.8:i386 : Breaks: libpcap0.8 (!= 1.5.3-2) but 1.4.0-2 is installed
 libpcap0.8-dev : Depends: libpcap0.8 (= 1.5.3-2) but 1.4.0-2 is installed
E: Unmet dependencies. Try using -f.

当我运行时,apt-get remove -f发生了以下情况:

root@System:~/Downloads# sudo apt-get remove -f
The following extra packages will be installed:
  libpcap0.8
The following packages will be upgraded:
  libpcap0.8
1 upgraded, 0 newly installed, 0 to remove and 365 not upgraded.
2 not fully installed or removed.
Need to get 0 B/110 kB of archives.
After this operation, 13.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 163539 files and directories currently installed.)
Preparing to unpack .../libpcap0.8_1.5.3-2_amd64.deb ...
Unpacking libpcap0.8:amd64 (1.5.3-2) over (1.4.0-2) ...
dpkg: error processing archive /var/cache/apt/archives/libpcap0.8_1.5.3-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/man/man7/pcap-filter.7.gz', which is different from other instances of package libpcap0.8:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
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_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@System:~/Downloads# clear

root@System:~/Downloads# sudo apt-get remove -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libpcap0.8
The following packages will be upgraded:
  libpcap0.8
1 upgraded, 0 newly installed, 0 to remove and 365 not upgraded.
2 not fully installed or removed.
Need to get 0 B/110 kB of archives.
After this operation, 13.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 163539 files and directories currently installed.)
Preparing to unpack .../libpcap0.8_1.5.3-2_amd64.deb ...
Unpacking libpcap0.8:amd64 (1.5.3-2) over (1.4.0-2) ...
dpkg: error processing archive /var/cache/apt/archives/libpcap0.8_1.5.3-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/man/man7/pcap-filter.7.gz', which is different from other instances of package libpcap0.8:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
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_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@System:~/Downloads# 

root@System:~/Downloads# sudo apt-get check
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.4.0-2) but 1.5.3-2 is installed
 libpcap0.8:i386 : Breaks: libpcap0.8 (!= 1.5.3-2) but 1.4.0-2 is installed
 libpcap0.8-dev : Depends: libpcap0.8 (= 1.5.3-2) but 1.4.0-2 is installed
E: Unmet dependencies. Try using -f.
root@System:~/Downloads# apt-cache policy libpcap0.8:amd64 libpcap0.8 libpcap0.8-dev
libpcap0.8:
  Installed: 1.4.0-2
  Candidate: 1.5.3-2
  Version table:
     1.5.3-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
 *** 1.4.0-2 0
        100 /var/lib/dpkg/status
libpcap0.8:
  Installed: 1.4.0-2
  Candidate: 1.5.3-2
  Version table:
     1.5.3-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
 *** 1.4.0-2 0
        100 /var/lib/dpkg/status
libpcap0.8-dev:
  Installed: 1.5.3-2
  Candidate: 1.5.3-2
  Version table:
 *** 1.5.3-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
root@System:~/Downloads# 




root@System:~/Downloads# sudo apt-get -f remove libpcap0.8 libpcap0.8-dev libpcap0.8-dev:i386 libpcap0.8:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'libpcap0.8-dev:i386' is not installed, so not removed. Did you mean 'libpcap0.8-dev'?
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libpcap-dev : Depends: libpcap0.8-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@System:~/Downloads# 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
The following packages will be upgraded:
  libpcap0.8
1 upgraded, 0 newly installed, 0 to remove and 365 not upgraded.
2 not fully installed or removed.
Need to get 0 B/110 kB of archives.
After this operation, 13.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 163539 files and directories currently installed.)
Preparing to unpack .../libpcap0.8_1.5.3-2_amd64.deb ...
Unpacking libpcap0.8:amd64 (1.5.3-2) over (1.4.0-2) ...
dpkg: error processing archive /var/cache/apt/archives/libpcap0.8_1.5.3-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/man/man7/pcap-filter.7.gz', which is different from other instances of package libpcap0.8:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
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_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@System:~/Downloads# 

答案1

解决方案很简单:

sudo apt-get -f remove libpcap-dev libpcap0.8 libpcap0.8-dev libpcap0.8-dev:i386 libpcap0.8:i386

那么,为什么会发生这种情况?您有两个版本的 libpcap0.8 包,一个用于 amd64,另一个用于 i386,这两个版本应该是冲突的,但我猜您之前使用过 PPA 来安装这些包,而它们没有正确的冲突字段。

答案2

如果你像我一样安装了 i386 和 amd64,那么从 ppa 中我所做的就是手动删除文件

cd /usr/lib/i386-linux-gnu
  sudo rm libpcap0.8:i386

然后运行

sudo apt-get -f install

答案3

sudo apt-get purge libpcap0.8-dev libpcap0.8:i386 libpcap-dev libwine libwine:i386 wine32:i386 wine64 wine winetricks

我很高兴找到它:D

相关内容