几个月前更新后,Wireshark 不会更新。我学会了取消检查但今天忘记了。更新程序已下载所有更新。当我尝试更新时收到以下错误消息。当我尝试使用 apt-get remove 和 apt-get purge 来摆脱 Wireshark 时,我可能犯了一个错误。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libwireshark-data
The following NEW packages will be installed:
libwireshark-data
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
1 not fully installed or removed.
Need to get 0 B/848 kB of archives.
After this operation, 5,292 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 233363 files and directories currently installed.)
Preparing to unpack .../libwireshark-data_1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0_all.deb ...
Unpacking libwireshark-data (1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0) ...
dpkg: error processing archive /var/cache/apt/archives/libwireshark-data_1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0_all.deb (--unpack):
trying to overwrite '/usr/share/wireshark/dtds/pocsettings.dtd', which is also in package wireshark-common 1.99.0+git20140730111853~82bb8008-0ubuntu1~trusty1~ppa0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwireshark-data_1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
programmer@fireimager:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libwireshark0:amd64:
libwireshark0:amd64 depends on libwireshark-data (>= 1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0); however:
Package libwireshark-data is not installed.
dpkg: error processing package libwireshark0:amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libwireshark0:amd64
这也失败了。
apt-get -f install
如何修复 apt-get 数据库?
编辑
根据 Terrance 的评论,我再次搜索并发现:
sudo dpkg --remove --force-remove-reinstreq wireshark
sudo dpkg --remove -force --force-remove-reinstreqgrep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* wireshark
我得到了运行的第一个命令,但第二个命令似乎格式不正确。
在/usr/share/wireshark
我找到这些文件和目录(partial
是空的)。
libwireshark-data_1.99.6+git20150422121542~afb70bba-0ubuntu1~trusty1~ppa0_all.deb
libwireshark-data_1.99.6+git20150424075214~b284de81-0ubuntu1~trusty1~ppa0_all.deb
lock
partial
/usr/share/wireshark
有几个目录和文件。
没有 Wireshark 我也能过得很好。
编辑
apt-cache policy libwireshark-data
libwireshark-data:
Installed: 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0
Candidate: 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0
Version table:
*** 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0 0
500 http://ppa.launchpad.net/dreibh/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
1.10.6-1 0
500 http://apt-cache policy wireshark-common/ubuntu/ trusty/universe amd64 Packages
和
apt-cache policy wireshark-common
wireshark-common:
Installed: 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0
Candidate: 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0
Version table:
*** 1.99.6+git20150430165916~3bf0d14a-0ubuntu1~trusty1~ppa0 0
500 http://ppa.launchpad.net/dreibh/ppa/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
1.10.6-1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
因此至少有一个文件
pocsettings.dtd
包含在包 libwireshark-data 和 libwireshark-common 中。尝试从以下位置删除该文件名:所以它不知道冲突并将安装新版本。
我假设以下步骤不会解决问题。两个包,
wireshark-common
并libwireshark-data
尝试创建相同的文件。请联系Thomas Dreibholz。让我们仍然尝试。
有可能
aptitude
提出不同的版本来解决冲突。查看所有建议并选择最佳建议。我无法预见的问题。你依赖你自己。安装两个工具:
有可能在以下步骤中
aptitude
提出不同的版本来解决冲突。查看所有建议并选择最佳建议。我无法预见的问题。你依赖你自己。家政:
ppa:dreibh/ppa
临时删除 PPA :删除wireshark:
再次添加 PPA:
安装
wireshark
在终端试试这个:
它一定有助于清理你的 apt-get,并安装新的包