The following packages have unmet dependencies (Depends: libcairo2, libcairo-gobject2)

Asked by Michael Heuberger

When I attempt to install libcairo2-dev, I am getting this error:

```
$ sudo apt-get install libcairo2-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:
 libcairo2-dev : Depends: libcairo2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
                 Depends: libcairo-gobject2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.
```

Any clues? Did some research and googled everywhere but didn't find an answer/solution to that. Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cairo Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Heuberger
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of :

lsb_release -a; uname -a; apt-cache policy libcairo2-dev

Revision history for this message
Michael Heuberger (michael.heuberger) said :
#2

$ lsb_release -a; uname -a; apt-cache policy libcairo2-dev
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic
Linux M2 3.16.0-31-generic #41-Ubuntu SMP Tue Feb 10 15:24:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
libcairo2-dev:
  Installed: (none)
  Candidate: 1.13.0~20140204-0ubuntu1
  Version table:
     1.13.0~20140204-0ubuntu1 0
        500 http://nz.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

When looking at https://launchpad.net/ubuntu/+source/cairo this seems to me to be a regression bug in the cairo package.

trusty has a higher version that utopic leading to exactly that dependency problem that you experience.

Reason for creating a new trusty version was bug #1391857

I think someone affected should create a new bug report against cairo with the tag "regression-update"

The following steps should be sufficient for duplicating that bug:

On a trusty implementation install libcairo2 from trusty-updates (version 1.13.0~20140204-0ubuntu1.1), but not libcariro2-dev.
Upgrade from trusty to utopic
try installing libcariro2-dev
This fails with

The following packages have unmet dependencies:
libcairo2-dev : Depends: libcairo2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
                  Depends: libcairo-gobject2 (= 1.13.0~20140204-0ubuntu1) but 1.13.0~20140204-0ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Proposal for solution: The cairo packages with version 1.13.0~20140204-0ubuntu1.1 are also required for utopic!

Revision history for this message
Michael Heuberger (michael.heuberger) said :
#4

Thanks Manfred. So, what should I do now? Wait until a bugfix is out?

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

The bugfix is already out (the missing package was copied from trusty to utopic two and a half days ago).

Just do an update (update-manager or apt-get update / apt-get upgrade). This should upgrade the cairo packages that you have already installed from the ...0ubuntu1 to the ...0ubuntu1.1 version, and as soon as you have done that, the installation of the libcairo2-dev package should work without problem.

Revision history for this message
Michael Heuberger (michael.heuberger) said :
#6

Ah, works now. Thanks!