I am trying to install libglib2.0-dev by trying

brian@computer:~$ sudo apt-get install libglib2.0-dev

However I get back:

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:
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.1-1~ubuntu16.04.1 is to be installed
              Depends: libglib2.0-bin (= 2.48.0-1ubuntu4)
E: Unable to correct problems, you have held broken packages.

Oh no! What if I try to install those missing packages myself?

brian@computer:~$ sudo apt-get install libglib2.0-0 libglib2.0-bin

Then I get :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglib2.0-0 is already the newest version (2.48.1-1~ubuntu16.04.1).
libglib2.0-bin is already the newest version (2.48.1-1~ubuntu16.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 11 not to upgrade.

So they are already installed ... What to do now? I do see there is some discrepancy regarding 2.48.0-1ubuntu4) and 2.48.1-1~ubuntu16.04.1 but what does that mean and how can I make it go away?


This may be a transient problem with the Ubuntu mirror which you're using - it has the new libglib2.0 but not the corresponding -dev package yet. Try switching to different mirror, or manually downloading and installing it:

curl -O http://gb.archive.ubuntu.com/ubuntu/pool/main/g/glib2.0/libglib2.0-dev_2.48.1-1~ubuntu16.04.1_amd64.deb
dpkg -i libglib2.0-dev_2.48.1-1~ubuntu16.04.1_amd64.deb
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.