0

I'm trying to install GTK library in ubuntu 16.04 LTS but I'm getting error saying E: Unable to correct problems, you have held broken packages.

nikhil@nikhil-desktop:~$ sudo apt-get install libgtk-3-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libgtk-3-dev : Depends: libgtk-3-0 (= 3.18.9-1ubuntu3) but 3.20.8-1ubuntu0~ppa1 is to be installed
                Depends: gir1.2-gtk-3.0 (= 3.18.9-1ubuntu3) but 3.20.8-1ubuntu0~ppa1 is to be installed
                Depends: libgdk-pixbuf2.0-dev (>= 2.30.0) but it is not going to be installed
                Depends: libpango1.0-dev (>= 1.37.3) but it is not going to be installed
                Depends: libatk-bridge2.0-dev but it is not going to be installed
                Depends: libepoxy-dev (>= 1.0) but it is not going to be installed
                Depends: libxcursor-dev but it is not going to be installed
                Depends: libegl1-mesa-dev but it is not going to be installed
                Depends: libwayland-dev (>= 1.5.91) but it is not going to be installed
                Depends: libmirclient-dev (>= 0.13.3) but it is not going to be installed
                Depends: nettle-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

How can I fix this issue, I'm trying to install opencv with this package library, how can I install it without getting any errors, I'm following instructions from PYimage search.

  • i looked up libgtk-3-dev rules (via https://packages.ubuntu.com/xenial/libgtk-3-dev) and its correct. xenial should have libgtk-3-0 3.18.9 (just as your error message says) and not the 3.20.8 so you have something non-xenial in your sources.list* files that shouldn't be there. Look for non-xenial sources (later unsupported releases as artful uses 3.22) – guiverc May 16 '18 at 05:18
  • I have deb http://in.archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse in my source.list file – Nikhil R May 16 '18 at 06:17
  • I suspect there is more; as archive.ubuntu.com will have (for xenial) 3.18.9 as the rule states. You, I'm guessing have a non-Canonical source, or a source/ppa for an unsupported version (16.10, 17.04) which is providing the unsupported 3.20.8 version that is found (in sources.list or source.list.d/*) Somewhere is pointing to a higher numbered package I believe. Please apt-cache policy libgtk-3-dev libgtk-3-0 and edit your question adding the (command &) output to your question. – guiverc May 16 '18 at 06:38

0 Answers0