Ubuntu 18.04 - can't install hplip 3.19.11 due to broken libcups2-dev

Asked by Tiago Diogo on 2019-12-07

hello!
i purchased a hp officejet 8012 and it requires hplip 3.19.11
i downloaded the hplip3.19.11.run and got problems with libcups2-dev error: Command failed. Re-try #1...
when i tried to install it manually the problem is:
 libcups2-dev : Depends: libcupsimage2-dev (= 2.2.7-1ubuntu2.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

How can i install the required software for my printer on my sistem?
I provide the hp-check -t below
thank you,
Tiago

System Info:
Ubuntu 18.04

hp-check -t
HP Linux Imaging and Printing System (ver. 3.17.10)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if
the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP
supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and
run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
    OK
    MISSING - Missing Dependency or Permission or Plug-in
    INCOMPAT - Incompatible dependency-version or Plugin-version

warning: 12-18.04 version is not supported. Using 12-17.04 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 GNU/Linux
 Host: C3PO
 Proc: 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 GNU/Linux
 Distribution: 12 18.04
 Bitness: 64 bit

-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.17.10
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 12 distro 18.04 version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.17.10

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.17.10
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no

Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
installed = 1
eula = 1
version = 3.17.10

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
device_uri = hp:/net/Photosmart_C6200_series?zc=HP398628

[installation]
date_time = 12/07/19 14:26:55
version = 3.17.10

 <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>

-------------------------
| External Dependencies |
-------------------------

 error: cups CUPS - Common Unix Printing System REQUIRED 1.1 - INCOMPAT 'CUPS may not be installed or not running'
 gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.26 OK -
 error: xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 - MISSING 'xsane needs to be installed'
 scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.27 OK -
 dbus DBus - Message bus system REQUIRED - 1.12.2 OK -
 policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
 network network -wget OPTIONAL - 1.19.4 OK -
 avahi-utils avahi-utils OPTIONAL - 0.7 OK -

------------------------
| General Dependencies |
------------------------

 libjpeg libjpeg - JPEG library REQUIRED - - OK -
 error: cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - - MISSING 'cups-devel needs to be installed'
 error: cups-image CUPS image - CUPS image development files REQUIRED - - MISSING 'cups-image needs to be installed'
 libpthread libpthread - POSIX threads library REQUIRED - b'2.27' OK -
 libusb libusb - USB library REQUIRED - 1.0 OK -
 sane SANE - Scanning library REQUIRED - - OK -
 error: sane-devel SANE - Scanning library development files REQUIRED - - MISSING 'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 - MISSING 'libnetsnmp-devel needs to be installed'
 libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.1 OK -
 python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.6.9 OK -
 python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
 error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 - MISSING 'python3-pyqt4-dbus needs to be installed'
 error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 - MISSING 'python3-pyqt4 needs to be installed'
 python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.6 OK -
 python3-xml Python XML libraries REQUIRED - 2.2.5 OK -
 error: python3-devel Python devel - Python development files REQUIRED 2.2 3.6.9 MISSING 'python3-devel needs to be installed'
 python3-pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 1.1.7 OK -
 python3-reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.4.0 OK -

--------------
| COMPILEDEP |
--------------

 libtool libtool - Library building support services REQUIRED - 2.4.6 OK -
 gcc gcc - GNU Project C and C++ Compiler REQUIRED - 7.4.0 OK -
 make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.1 OK -

---------------------
| Python Extentions |
---------------------

 cupsext CUPS-Extension REQUIRED - 3.17.10 OK -
 hpmudext IO-Extension REQUIRED - 3.17.10 OK -

----------------------
| Scan Configuration |
----------------------

'/etc/sane.d/dll.d/hpaio' not found.
 hpaio HPLIP-SANE-Backend REQUIRED - 3.17.10 OK 'hpaio found in /etc/sane.d/dll.conf'
 scanext Scan-SANE-Extension REQUIRED - 3.17.10 OK -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

No Scanner found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

lpstat
------
Type: Unknown
Device URI: No destinations added.

--------------
| PERMISSION |
--------------

-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
error: 'libcups2' package is missing/incompatible
error: 'libcups2-dev' package is missing/incompatible
error: 'cups-bsd' package is missing/incompatible
error: 'cups-client' package is missing/incompatible
error: 'libcupsimage2-dev' package is missing/incompatible
error: 'libsane-dev' package is missing/incompatible
error: 'libsnmp-dev' package is missing/incompatible
error: 'snmp-mibs-downloader' package is missing/incompatible
error: 'python3-pyqt4' package is missing/incompatible
error: 'gtk2-engines-pixbuf' package is missing/incompatible
error: 'python3-dev' package is missing/incompatible

Missing Optional Dependencies
-----------------------------
error: 'gtk2-engines-pixbuf' package is missing/incompatible
error: 'xsane' package is missing/incompatible
error: 'python3-dbus.mainloop.qt' package is missing/incompatible

Total Errors: 9
Total Warnings: 0

Done.

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2019-12-07
Last query:
2019-12-07
Last reply:
2019-12-07
brian_p (claremont102) said : #1

> i purchased a hp officejet 8012 and it requires hplip 3.19.11

Actually, this device does not require any part of HPLIP for printing. See

https://wiki.debian.org/CUPSQuickPrintQueues#MFDs_and_Their_Scanning_Function

--
Brian.

Tiago Diogo (tiagodiogo) said : #2

hello brian,
i was under that impression due to the listing on
https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

that has this line:
HP OfficeJet 8010 All-in-One Printer series 3.19.5

since it does not required hplip can you provide me with the list of steps and/or required packages to print and scan on my instalation?

kind regards,

Tiago

Tiago Diogo (tiagodiogo) said : #3

currently i am able do discover my printer and add it as driverless.
print is working but scanning is not.

i followed the step on the link you provided
https://wiki.debian.org/CUPSQuickPrintQueues#MFDs_and_Their_Scanning_Function

and ran the command:
apt install libsane-hpaio --no-install-recommends

but still there is no scanner found

kind regards,

Tiago

Manfred Hampl (m-hampl) said : #4

Apart from the printing question (for which I cannot help), you seem to have an inconsistency in your package management system.

What output do you receive for the commands

apt-cache policy libcups2-dev libcupsimage2-dev
sudo apt install libcups2-dev libcupsimage2-dev

Tiago Diogo (tiagodiogo) said : #5

hello Manfred,

apt-cache policy libcups2-dev libcupsimage2-dev
libcups2-dev:
  Installed: (none)
  Candidate: 2.2.7-1ubuntu2.7
  Version table:
     2.2.7-1ubuntu2.7 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.2.7-1ubuntu2 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
libcupsimage2-dev:
  Installed: (none)
  Candidate: 2.2.7-1ubuntu2.7
  Version table:
     2.2.7-1ubuntu2.7 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.2.7-1ubuntu2 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

sudo apt install libcups2-dev libcupsimage2-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:
 libcupsimage2-dev : Depends: libtiff-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Manfred Hampl (m-hampl) said : #6

ok, what is the output of

sudo dpkg --audit
sudo apt install libcupsimage2-dev libtiff-dev

Tiago Diogo (tiagodiogo) said : #7

hello Manfred,

the first command provided no output

sudo apt install libcupsimage2-dev libtiff-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:
 libtiff-dev : Depends: libtiff5-dev (>= 4.0.9-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Manfred Hampl (m-hampl) said : #8

Further in the chain of dependencies, what is the output of

sudo apt install libtiff-dev libtiff5-dev

Tiago Diogo (tiagodiogo) said : #9

hello Manfred,

libtiff-dev : Depends: libtiff5-dev (>= 4.0.9-1) but it is not going to be installed

libtiff5-dev : Depends: libjbig-dev but it is not going to be installed

libjbig-dev : Depends: libjbig0 (= 2.1-3.1build1) but 2.1-3.1+deb.sury.org~xenial+1 is to be installed

libjbig0 is already the newest version (2.1-3.1+deb.sury.org~xenial+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Manfred Hampl (m-hampl) said : #10

Ok, well done.

What is now the output of

apt-cache policy libjbig-dev libjbig0

There seems to be a PPA that created the dependency problem.

Tiago Diogo (tiagodiogo) said : #11

hello Manfred

apt-cache policy libjbig-dev libjbig0
libjbig-dev:
  Installed: (none)
  Candidate: 2.1-3.1build1
  Version table:
     2.1-3.1build1 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
libjbig0:
  Installed: 2.1-3.1+deb.sury.org~xenial+1
  Candidate: 2.1-3.1+deb.sury.org~xenial+1
  Version table:
 *** 2.1-3.1+deb.sury.org~xenial+1 100
        100 /var/lib/dpkg/status
     2.1-3.1build1 500
        500 http://pt.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

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

This is what I expected. It seems that you once had PPA:ondrej/php activated.

There are now two possibilities:
1. downgrade libjbig0 to the version in the standard Ubuntu repositories
or
2. re-enable PPA:ondrej/php to install libjbig-dev also from that PPA.

for 1. the command is
sudo apt install libjbig0=2.1-3.1build1

for 2. the command is
sudo apt-add-repository PPA:ondrej/php

You have to decide; I do not know why you had that PPA enabled in the past.

Tiago Diogo (tiagodiogo) said : #13

hello Manfred

thank you for your analysis,
i followed the first approach and was able to successfully downgrade libjbig allowing to install libcups2-dev
after installing libcups2-dev i was able to install the latest version of HPLIP(3.19.11)
after installing HPLIP i am now able to print and scan!

with this i mark this problem as solved!
thank you for your support and help through this issue

since i am always eager to learn, today i learned that you can downgrade a package by specifying the version you want to install
but i was unable to tell from the apt-cache policy command how did you new about the conflicting PPA?

can you please teach me how to approach, understand and correct these issues?

Tiago Diogo (tiagodiogo) said : #14

Thanks Manfred Hampl, that solved my question.

brian_p (claremont102) said : #15

> can you please teach me how to approach, understand and
> correct these issues?

You posted the output of 'hp-check -t'. It says

  > Distribution: 12 18.04

Nowhere did you say - I have Ubuntu 18.04 but I have modified it to
include lots of other software, such as material from a ppa. But I am
going to let you guess about this.

You might want to consider this in the future.

Tiago Diogo (tiagodiogo) said : #16

hello brian

as you might imagine, if i open a thread asking for help regarding an issue i am encountering is because i am not understanding what is happening.
i'm sorry to have you lost some of your time and resources looking into my problem.

brian_p (claremont102) said : #17

Hello Tiago,

There was really no problem. Glad you got things going.

Manfred Hampl (m-hampl) said : #18

how did you know about the conflicting PPA?
can you please teach me how to approach, understand and correct these issues?

The identification of the cause was a combination of the output
libjbig-dev : Depends: libjbig0 (= 2.1-3.1build1) but 2.1-3.1+deb.sury.org~xenial+1 is to be installed
(showing two different version numbers)
and the output
libjbig0:
   Installed: 2.1-3.1+deb.sury.org~xenial+1
   Candidate: 2.1-3.1+deb.sury.org~xenial+1
   Version table:
  *** 2.1-3.1+deb.sury.org~xenial+1 100
         100 /var/lib/dpkg/status
      2.1-3.1build1 500
         500 http://pt.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
(not showing a source address for version 2.1-3.1+deb.sury.org~xenial+1)
The version name (including "sury") let me assume that the source was https://launchpad.net/~ondrej/+archive/ubuntu/php by Ondřej Surý