0

I am getting the below dependency errors while installing wireshark on my machine

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 wireshark : Depends: wireshark-qt but it is not going to be installed or
                      wireshark-gtk but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Why it is not installing these wireshark dependencies and how can I fix it?

Below is my system configuration

Linux shadows 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Edit 1

$ sudo apt-cache policy wireshark wireshark-qt wireshark-gtk
wireshark:
  Installed: (none)
  Candidate: 2.4.3-1~zesty1
  Version table:
     2.4.3-1~zesty1 500
        500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages
     2.2.6+g32dac6a-2ubuntu0.16.04 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     2.0.2+ga16e22e-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
wireshark-qt:
  Installed: (none)
  Candidate: 2.4.3-1~zesty1
  Version table:
     2.4.3-1~zesty1 500
        500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages
     2.2.6+g32dac6a-2ubuntu0.16.04 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     2.0.2+ga16e22e-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
wireshark-gtk:
  Installed: (none)
  Candidate: 2.4.3-1~zesty1
  Version table:
     2.4.3-1~zesty1 500
        500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages
     2.2.6+g32dac6a-2ubuntu0.16.04 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     2.0.2+ga16e22e-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Edit2

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="17.04 (Zesty Zapus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.04"
VERSION_ID="17.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=zesty
UBUNTU_CODENAME=zesty
Zanna
  • 70,465
  • Please edit your question with output of apt-cache policy wireshark wireshark-qt wireshark-gtk. – N0rbert Jan 27 '18 at 14:10
  • 1
    What Ubuntu version do you use? If it is 16.04 xenial why you have connected PPA for zesty (17.04, EOL)? – N0rbert Jan 27 '18 at 14:18
  • Actually I initially installed zesty and then after some time migrated back to xenial. – Prateek Joshi Jan 27 '18 at 14:23
  • I can't understand this. Please update your question with output of cat /etc/os-release. – N0rbert Jan 27 '18 at 14:29
  • the package it is asking you to install is the GUI front end for wireshark. QT if for KDE and similar QT based desktops. GTK is for gnome and other GTK based desktops. – ravery Jan 28 '18 at 19:43
  • @ravery but when I try install wireshark-gtk , it gives me the error, wireshark-gtk : Depends: libnl-route-3-200 (>= 3.2.7) but it is not going to be installed. – Prateek Joshi Jan 28 '18 at 19:46
  • sudo apt-get install -f will install dependencies. however, you might get duplicates. ie qt and gtk. Aptitude is good for looking at dependency chains and installing as needed. – ravery Jan 28 '18 at 19:51
  • @ravery I have ready tried this, but I am getting the same error. – Prateek Joshi Jan 28 '18 at 20:02

1 Answers1

0

The solution is to remove Wireshark PPA and install Wireshark from Ubuntu universe repository:

sudo apt-get install ppa-purge

sudo ppa-purge ppa:wireshark-dev/stable
sudo apt-get install wireshark
N0rbert
  • 99,918