由于 wireshark-common 中的错误,以 sudo 超级用户身份安装 wireshark 失败

由于 wireshark-common 中的错误,以 sudo 超级用户身份安装 wireshark 失败

我没有 root 密码,因此我进入 sudo 超级用户模式,尝试在笔记本电脑上安装 wireshark。我之前尝试过安装 wireshark,但第一次安装时我没有 root 访问权限,因此没有收到任何数据。我删除了该程序并尝试重新安装它,结果收到了这个漂亮的错误消息:

Daniel-Thinkpad daniel # sudo aptitude install wireshark
The following NEW packages will be installed:
  libc-ares2{a} libwireshark-data{a} libwireshark5{a} libwiretap4{a} libwsutil4{a} wireshark wireshark-common{a} 
0 packages upgraded, 7 newly installed, 0 to remove and 2 not upgraded.
Need to get 13.7 MB of archives. After unpacking 77.9 MB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://archive.ubuntu.com/ubuntu/ trusty/main libc-ares2 amd64 1.10.0-2 [38.5 kB]
Get: 2 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main libwsutil4 amd64 1.12.4-1ubuntu1~ppa2~t [131 kB]
Get: 3 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main libwiretap4 amd64 1.12.4-1ubuntu1~ppa2~t [219 kB]
Get: 4 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main libwireshark-data all 1.12.4-1ubuntu1~ppa2~t [898 kB]
Get: 5 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main libwireshark5 amd64 1.12.4-1ubuntu1~ppa2~t [11.2 MB]
Get: 6 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main wireshark-common amd64 1.12.4-1ubuntu1~ppa2~t [232 kB]                                                                                                                    
Get: 7 http://ppa.launchpad.net/pi-rho/security/ubuntu/ trusty/main     wireshark amd64 1.12.4-1ubuntu1~ppa2~t [957 kB]                                                                                                                           
Fetched 13.7 MB in 36s (370 kB/s)                                                                                                                                                                                                             
Preconfiguring packages ...
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 175945 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.10.0-2_amd64.deb ...
Unpacking libc-ares2:amd64 (1.10.0-2) ...
Selecting previously unselected package libwsutil4:amd64.
Preparing to unpack .../libwsutil4_1.12.4-1ubuntu1~ppa2~t_amd64.deb ...
Unpacking libwsutil4:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Selecting previously unselected package libwiretap4:amd64.
Preparing to unpack .../libwiretap4_1.12.4-1ubuntu1~ppa2~t_amd64.deb ...
Unpacking libwiretap4:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Selecting previously unselected package libwireshark-data.
Preparing to unpack .../libwireshark-data_1.12.4-1ubuntu1~ppa2~t_all.deb ...
Unpacking libwireshark-data (1.12.4-1ubuntu1~ppa2~t) ...
Selecting previously unselected package libwireshark5:amd64.
Preparing to unpack .../libwireshark5_1.12.4-1ubuntu1~ppa2~t_amd64.deb ...
Unpacking libwireshark5:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Selecting previously unselected package wireshark-common.
Preparing to unpack .../wireshark-common_1.12.4-1ubuntu1~ppa2~t_amd64.deb ...
Unpacking wireshark-common (1.12.4-1ubuntu1~ppa2~t) ...
Selecting previously unselected package wireshark.
Preparing to unpack .../wireshark_1.12.4-1ubuntu1~ppa2~t_amd64.deb ...
Unpacking wireshark (1.12.4-1ubuntu1~ppa2~t) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Setting up libc-ares2:amd64 (1.10.0-2) ...
Setting up libwsutil4:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Setting up libwiretap4:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Setting up libwireshark-data (1.12.4-1ubuntu1~ppa2~t) ...
Setting up libwireshark5:amd64 (1.12.4-1ubuntu1~ppa2~t) ...
Setting up wireshark-common (1.12.4-1ubuntu1~ppa2~t) ...
Executing "addgroup --quiet --system wireshark" failed.
Most probably the wireshark group exists, but is not a system group.
Please delete the existing group or re-create it as a system group and try configuring wireshark-common again.
dpkg: error processing package wireshark-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of wireshark:
 wireshark depends on wireshark-common (= 1.12.4-1ubuntu1~ppa2~t); however:
  Package wireshark-common is not configured yet.

dpkg: error processing package wireshark (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Errors were encountered while processing:
 wireshark-common
 wireshark
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up wireshark-common (1.12.4-1ubuntu1~ppa2~t) ...
Executing "addgroup --quiet --system wireshark" failed.
Most probably the wireshark group exists, but is not a system group.
Please delete the existing group or re-create it as a system group and try     configuring wireshark-common again.
dpkg: error processing package wireshark-common (--configure):
 subprocess installed post-installation script returned error exit status     1
dpkg: dependency problems prevent configuration of wireshark:
 wireshark depends on wireshark-common (= 1.12.4-1ubuntu1~ppa2~t);      however:
  Package wireshark-common is not configured yet.

dpkg: error processing package wireshark (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 wireshark-common
 wireshark

我不知道该怎么办。

答案1

关键部分是这个。

Most probably the wireshark group exists, but is not a system group.
Please delete the existing group or re-create it as a system group and try configuring wireshark-common again.

尝试使用 删除现有wireshark组(可能是您以前安装 Wireshark 时遗留下来的)sudo groupdel wireshark,然后运行sudo dpkg --configure -a以配置新的 Wireshark 包。

答案2

答案就在你的问题里:

Executing "addgroup --quiet --system wireshark" failed.
Most probably the wireshark group exists, but is not a system group. 
Please delete the existing group or re-create it as a system group and try configuring wireshark-common again.

因此删除该群组

sudo delgroup wireshark
sudo addgroup --quiet --system wireshark
sudo apt-get install --reinstall wireshark

相关内容