7

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?

1
  • 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, 2011 at 22:18

2 Answers 2

11

Try to do it with aptitude:

sudo aptitude install libglib2.0-dev
4
  • Thank you. aptitude offered me to downgrade 2 packages and after I have accepted this solution the needed package was installed.
    – bessarabov
    Sep 18, 2011 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 Feb 2, 2013 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..? Oct 29, 2017 at 0:19
  • Nope, it's smarter and can resolve such dependency conflicts.
    – Daniel
    Oct 30, 2017 at 7:51
1

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
1
  • Hmmm... forcing an old libglib version on my machine asks to remove the gnome desktop manager. That could be dangerous. :)
    – tresf
    Sep 23, 2022 at 4:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .