Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install libcairo2-dev package on ubuntu 12.04. The error message is as follows:

requires: libcairo2 (= 1.10.2-6.1ubuntu2) but 1.10.2-6.1ubuntu3 is about to be installed                 
requires: libcairo-gobject2 (= 1.10.2-6.1ubuntu2) but 1.10.2-6.1ubuntu3 is about to be installed
                 requires: libglib2.0-dev but it won't be installed

Don't really know what to do next, tried googling but with no luck :(

share|improve this question

migrated from serverfault.com Oct 19 '12 at 22:21

This question came from our site for system and network administrators.

1  
Did you run sudo apt-get update first? –  Michael Hampton Oct 15 '12 at 17:28
    
yes, I did. as an act of desperation I've even run sudo apt-get upgrade ;) –  Adrian Serafin Oct 15 '12 at 17:44
    
You may have a dependency that prohibits installing the requisite version of glib (2.0) -- just a guess though. –  voretaq7 Oct 19 '12 at 22:21
    
I have the same problem. It is crazy in the today-current(5th sept 2013) sudo apt-get update-ed packages lists that are in /var/lib/apt/lists/ there is only a mention of libcairo2 version: 1.10.2-6.1ubuntu2. Anyway I cannot even find how the 1.10.2-6.1ubuntu3 version commes up. It is here shown that the later version is an update. Still I cannot find it in any lists. In essence the 1.10.2-6.1ubuntu2 version should be working. –  humanityANDpeace Sep 5 '13 at 7:47

1 Answer 1

One solution could be to simply downgrade to the version indicated (in case this is possible). You can do this via (force version) in synaptic graphically. Or you can be cool and use the command line:

  • sudo apt-get install libcairo2=1.10.2-6.1ubuntu2 --reinstall
  • sudo apt-get install libcairo-gobject2=1.10.2-6.1ubuntu2 --reinstall

In best case there will be no troubles on the way of "downgrading those two packages". I had the same problem and there was no problem.

The reason for the occurence of the problem in the first place is that on your system the newer version have been installed. You have installed

libcairo2 (1.10.2-6.1ubuntu 3 ) and libcairo-gobject2 (1.10.2-6.1ubuntu 3 )

This can happend if one selects the "optional updates" (see picture) optional updates in the source-packages-repositories-configureation. This will cause those new versions to be installed. This normaly is no problem at all. and no error message will occur.

But then if you later on deslect/unselect the "optional updates". Then the those packages (the new version) will still be kept installed, while the new installs (like your libcairo2-dev) will be requesting version that are older (because the repos/package-sources do not have those "optional updates" included anymore). Then there is the unmet dependency.

So theoreitcally it might also help to make sure that you have the "optional updates packages" selected.

If this answer helped/solved, consider accepting it as the answer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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