2

I upgraded ubuntu to 15.10, then I tried to compile a gtk app and found out I had no GTK installed.

So I ran

sudo apt-get install libgtk-3-dev

but this is the output

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: libegl1-mesa-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

How can I fix this? I have no idea why there are these "unmet dependencies"... something wrong on the ppa side?

Severus Tux
  • 9,866
Dean
  • 185

1 Answers1

1

As you receive the you have held broken packages error message,
execute sudo apt-get install -f, which will fix it.

More information from the man page :

-f, --fix-broken
           Fix; attempt to correct a system with broken dependencies in place.
           This option, when used with install/remove, can omit any packages
           to permit APT to deduce a likely solution. If packages are
           specified, these have to completely correct the problem. The option
           is sometimes necessary when running APT for the first time; APT
           itself does not allow broken package dependencies to exist on a
           system. It is possible that a system's dependency structure can be
           so corrupt as to require manual intervention (which usually means
           using dpkg --remove to eliminate some of the offending packages).
           Use of this option together with -m may produce an error in some
           situations. Configuration Item: APT::Get::Fix-Broken.
Severus Tux
  • 9,866
  • Unfortunately this isn't fixing my problem: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – Dean Mar 04 '16 at 11:51
  • @Dean I suggest you run this command : sudo apt-get install libegl1-mesa-dev andmake sure all other dependencies given here are installed : http://packages.ubuntu.com/wily/libgtk-3-dev . If not, install them – Severus Tux Mar 04 '16 at 12:05