Can't install libcups2-dev - broken dependency

Asked by Chris Gill on 2017-03-29

I wanted to install libcups2-dev. I tried using apt-get and also synaptic package manager. Synaptic says that the latest version of libcups2-dev is 2.1.3-4 and that it depends on libcups2 version 2.1.3-4. But libcups2 is at version 2.1.3-4ubuntu0.2 so libcups2-dev won't install.

I tried using "Package -> Force Version" to ask for libcups2 to use version 2.1.3-4 but synaptic said that I would need to uninstall many packages, including gnome and ubuntu-desktop. This seems like a very bad option. Also, even if I could roll back the versions of all the other packages, I think that libcups2 version 2.1.3-4ubuntu0.2 was installed because of a security issue, so it would seem bad to install the old version anyway?

Is there any chance that a libcups2-dev version 2.1.3-4ubuntu0.2 might be in preparation? If this would be made available and would depend on libcups2 version 2.1.3-4ubuntu0.2 then I think the problem would go away, but I don't know how to prepare such a package myself.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2017-03-31
Last query:
2017-03-31
Last reply:
2017-03-30

What is the output of:

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

Thanks

Manfred Hampl (m-hampl) said : #2

Probably related to bug #1676380 and the related removal of cups version 2.1.3-4ubuntu0.2 which was in xenial-updates.

Manfred Hampl (m-hampl) said : #3

A possible workaround is to install a higher version from a PPA, e.g. https://launchpad.net/~torik-habib/+archive/ubuntu/cups

Many thanks for taking a look at this. Here's the command output you requested:

$ lsb_release -a; uname -a; apt-cache policy libcups2-dev libcups2
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Linux zephaniah 4.4.0-70-generic #91-Ubuntu SMP Wed Mar 22 12:47:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
libcups2-dev:
  Installed: (none)
  Candidate: 2.1.3-4
  Version table:
     2.1.3-4 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libcups2:
  Installed: 2.1.3-4ubuntu0.2
  Candidate: 2.1.3-4ubuntu0.2
  Version table:
 *** 2.1.3-4ubuntu0.2 100
        100 /var/lib/dpkg/status
     2.1.3-4 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Best Manfred Hampl (m-hampl) said : #5

I see three options for you:

1. temporarily enable the xenial-proposed repository. Installing libcups-dev should then work, but I recommend to disable the -proposed repository afterwards again unless you are willing to cope with bugs that show up only during the testing phase.

2. revert all cups packages to the 2.1.3-4 version
The command
dpkg -l | grep 2.1.3-4ubuntu0.2
will list all packages needing the downgrade

3. install a PPA with an even higher version of cups

Many thanks for the suggestions. For now I have used your option 1, and as you expected it has led to a successful installation of libcups2-dev version 2.1.3-4ubuntu0.2. I then disabled the -proposed repo, as you recommended.

Thanks again for helping me to get this up and running.

Thanks Manfred Hampl, that solved my question.