I'm running on 16.04 and I'm trying to install various packages for development, namely libglib2.0-dev
for a project I'm working on. But this isn't the only package that has done this lately. Getting MySQL installed this week was a pain. I keep getting the following:
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.
This is virtually the exact same thing that was happening with my MySQL installation. I've searched around and found some recommendations to use aptitude install
and apt-get install -f
but none of these have worked. I've also done the due dilligence of apt-get update
and apt-get dist-upgrade
as well as checking Main Server in Download From in Software & Updates. I tried sticking it in a bag of granola for a week, but it didn't seem to do anything.
Any idea what's going on? I see a few of these threads around with no real solutions.
As per suggestion, the output is of apt-cache policy alibglib2.0-dev libglib2.0-0 libglib2.0-bin is:
libglib2.0-dev:
Installed: (none)
Candidate: 2.48.0-1ubuntu4
Version table:
2.48.0-1ubuntu4 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libglib2.0-0:
Installed: 2.48.1-1~ubuntu16.04.1
Candidate: 2.48.1-1~ubuntu16.04.1
Version table:
*** 2.48.1-1~ubuntu16.04.1 100
100 /var/lib/dpkg/status
2.48.0-1ubuntu4 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libglib2.0-bin:
Installed: 2.48.1-1~ubuntu16.04.1
Candidate: 2.48.1-1~ubuntu16.04.1
Version table:
*** 2.48.1-1~ubuntu16.04.1 100
100 /var/lib/dpkg/status
2.48.0-1ubuntu4 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
apt-cache policy libglib2.0-dev libglib2.0-0 libglib2.0-bin
? – Byte Commander♦ Sep 20 '16 at 20:03sudo apt-get clean
followed by retrying your original installation command solve it? You have had a PPA or something that provided newer versions of some libraries which got cached on your disk and are incompatible with the version you need. – Byte Commander♦ Sep 20 '16 at 22:45