5

I have 10.04.2 LTS and I want to install libglib2.0-dev. So I do:

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install libglib2.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:
  libglib2.0-dev: Depends: libglib2.0-0 (= 2.24.0-0ubuntu4) but 2.24.1-0ubuntu1 is to be installed
E: Broken packages

I don't understand from where the 2.24.1-0ubuntu1 version came out. The package details are:

$ apt-cache showpkg libglib2.0-dev
Package: libglib2.0-dev
Versions: 
2.24.0-0ubuntu4 (/var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/ru.archive.ubuntu.com_ubuntu_dists_lucid_main_binary-i386_Packages
                  MD5: f1a310bc28a3b8566d2f79a4116e8a0e

How can I fix it and install libglib2.0-dev?

  • have you got the proposed repository enabled? Try unticking the proposed repository in software sources and do another update before trying to install. – fossfreedom Aug 25 '11 at 22:18
7

Try to do it with aptitude:

sudo aptitude install libglib2.0-dev
  • Thank you. aptitude offered me to downgrade 2 packages and after I have accepted this solution the needed package was installed. – bessarabov Sep 18 '11 at 9:52
  • For me it was sudo apt-get install libglib2.0-0=2.24.0-0ubuntu4 (that will downgrade the package) and then sudo apt-get install libglib2.0-dev – Michal Kováč Feb 2 '13 at 23:56
  • W00t? so aptitude did actually work. What are the differences between apt install and aptitude install? apt install fails due to missing dependencies in version numbers with libgdk-pixbuf2.0-dev, libgdk-pixbuf2.0-0 (= 2.32.2-1ubuntu1.3) 2.32.2-1ubuntu1.3ppa1, gir1.2-gdkpixbuf-2.0 (= 2.32.2-1ubuntu1.3) 2.32.2-1ubuntu1.3ppa1. Synaptic give similar problems, I have the feeling aptitude is less strict..? – danger89 Oct 29 '17 at 0:19
  • Nope, it's smarter and can resolve such dependency conflicts. – Daniel Oct 30 '17 at 7:51
0

You can install the needed version(= 2.24.0-0ubuntu4) and thus downgrade libglib2.0-0 which is of version (= 2.24.1-0ubuntu4).

sudo apt-get install libglib2.0-0=2.24.0-0ubuntu4

and now you can install the libglib2.0-dev

sudo apt-get install libglib2.0-dev

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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