Installation of libgtk2.0-dev failed

Hi,

On a fresh install of Ubuntu MATE 16.04.2 Xenial on my Raspberry 2, and after running:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo rpi-update
$ reboot

I wanted to install libgtk2.0-dev but I’ve got this error:

$ sudo apt-get install libgtk2.0-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:
 libgtk2.0-dev : Depends: libglib2.0-dev (>= 2.27.3) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not going to be installed
                 Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
                 Depends: libatk1.0-dev (>= 1.29.2) but it is not going to be installed
                 Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

As the distribution is up-to-date, ideally I don’t want to modify sources.list.

Does anyone have an idea of what could be done?

Thanks!

1 Like

In order to make sure I have all the things I need for GTK development on my RPI, I install ‘gnome-devel’. This installs much more than just libgtk2.0-dev but if you don’t mind the extra programs then its worth a shot… :wink:

1 Like

Try installing libglib2.0-dev, apt-get will show you “unmet dependencies” for it, then try installing one of these dependencies, and so on. Eventually you’ll get to the root cause.

It seems that the last update of Ubuntu MATE solve the problem! I’m now able to install libgtk2.0-dev normally.

2 Likes

Yeah I did that and included a massive composition of libraries fetched and installed. Actually it took a great amount of time for this process to be completed. There are only a few packages not installed due to missing dependencies. Hope this is INCLUSIVE and will resolve issues when installing new applications that need such libraries