hplip 3.19.1 not installable on ubuntu bionic

Bug #1816226 reported by Peter Schüller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I have a printer that requires hplip 3.18 and I am using bionic 18.04 Ubuntu which contains 3.17.

This might be the wrong place to report the following issues but I could not find out where to report otherwise, please direct me.

I tried the automatic installer for hplip-3.19.1 but it detects bionic as "debian-buster/sid" and then lets me correct this and it says that bionic is supported.

After selecting Ubuntu Bionic I get a message that many packages need to be installed, all their names are generic and incompatible with Ubuntu Bionic package names (for example "cups-devel").

When I confirm automatic installation, it reports

Missing REQUIRED dependency: cups-devel (CUPS devel- Common Unix Printing System development files)
warning: This installer cannot install 'cups-devel' for your distro/OS and/or version.

If I manually install libcups2-dev this missing dependency goes away.

But then the "libusb" dependency cannot be autmatically installed and cannot be satisfied by libusb-0.1-4 nor by libusb-1.0-0

I also found no ppa (would be great!)

Is there anything I can do to help fix the bionic detection or the auto-installer for the missing packages or is it just not possible to use hplip 3.19.1 on bionic?

Revision history for this message
brian_p (claremont102) wrote :

Have I missed something? Your account appears to have no mention of the printer model.

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

I have a MFP M281fdw scanner/colorlaser combination.

I am sorry that I did not mention the printer. I did not mention it because the problem with the hplip installer from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip and Ubuntu Bionic seems independent from the printer model.

Revision history for this message
brian_p (claremont102) wrote :

Knowing the printer is always useful and it means that certain things can be worked. For example, we now know the printer does not require a plugin.

Please provide the outputs of 'lpinfo -m | grep m281' and 'lpinfo -v' and say whether the connection is USB or not.

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

Thank you.

I am trying to do this over a WiFi connection.

The output of the commands is

```
$ lpinfo -m |grep -i m281
driverless:ipp://NPI5DAA8E.local:631/ipp/print HP ColorLaserJet MFP M278-M281, driverless, cups-filters 1.20.2
$ lpinfo -v
network ipp
file cups-brf:/
network lpd
network http
network socket
network beh
network ipps
network https
network dnssd://HP%20Color%20LaserJet%20MFP%20M281fdw%20(5DAA8E)._ipp._tcp.local/?uuid=564e424e-4c43-5846-3653-e4e7495daa8e
network socket://192.168.0.88
network ipp://NPI5DAA8E.local:631/ipp/print
```

Revision history for this message
Peter Schüller (schueller-p) wrote :

To answer your question: there is currently no USB connection but I could try to connect it temporarily if that would help you to gain some insights.

Revision history for this message
brian_p (claremont102) wrote :

No, a network connection is fine; best, in fact.

Peter, I hope you do not mind, but I am not going to treat your HPLIP issue because there is no need for you to use HPLIP. (And its easier for me :) ).

Please read

  https://wiki.debian.org/DriverlessPrinting

and

  https://wiki.debian.org/QuickPrintQueuesCUPS

Both are applicable to Bionic.

In essence:

  lpadmin -p m278 -v ipp://NPI5DAA8E.local:631/ipp/print -E -m everywhere

gets you a perfectly good working print queue.

How do you go on?

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

Thank you for the links. Printing now works, my next problem is scanning. ;)
I found useful information in your link https://wiki.debian.org/QuickPrintQueuesCUPS
It says that for scanning, installing libsane-hpaio should be sufficient.
I installed the package but scanning still does not work (scanimage -L do not report any scanner).

  journalctl -f

shows two lines

  scanimage[15408]: io/hpmud/model.c 532: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/models.dat
  scanimage[15408]: io/hpmud/model.c 543: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat

The first file exists, the second does not.

I tried to be clever and duplicated the entry of hp_color_laserjet_mfp_m277dw in the first file and rename it to colorlaserjet_mfp_m278-m281. Now scanimage -L reports a scanner.

But xsane reports "Failed to open device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88&queue=false': Error during device I/O.". So probably the models are not compatible.

Revision history for this message
Peter Schüller (schueller-p) wrote :

I have a small addition: when trying xsane, the journal shows the following messages:

  scanimage[16355]: common/utils.c 188: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header
  scanimage[16355]: common/utils.c 69: unable to open /var/lib/hp/hplip.state: No such file or directory
  scanimage[16355]: common/utils.c 119: validate_plugin_version() Failed to get Plugin version from [/var/lib/hp/hplip.state]
  scanimage[16355]: common/utils.c 157: Plugin version is not matching
  scanimage[16355]: common/utils.c 220: Invalid Library hanlder pLibHandler = NULL.

Actually the file /usr/lib/x86_64-linux-gnu/libm.so has the following content:

  /* GNU ld script
  */
  OUTPUT_FORMAT(elf64-x86-64)
  GROUP ( /lib/x86_64-linux-gnu/libm.so.6 AS_NEEDED ( /usr/lib/x86_64-linux-
 gnu/libmvec_nonshared.a /lib/x86_64-linux-gnu/libmvec.so.1 ) )

Revision history for this message
brian_p (claremont102) wrote :

> It says that for scanning, installing libsane-hpaio should be sufficient.

Bear in mind the assumption is that the scanner is supported by the libsane-hpaio and libhpmud0 versions on the system.

> scanimage[15408]: io/hpmud/model.c 532: no colorlaserjet_mfp_m278-m281
> attributes found in /usr/share/hplip/data/models/models.dat

Very unfortune. You have encountered this bug in HPLIP:

  https://bugs.launchpad.net/hplip/+bug/1797501

> I tried to be clever and duplicated the entry of
> hp_color_laserjet_mfp_m277dw in the first file and
> rename it to colorlaserjet_mfp_m278-m281.

Good initiative. This is exactly what you have to do.....

> Now scanimage -L reports a scanner.

..... and it works. What is the URI?

To confirm Bug #1797501 - please would you post the output of

avahi-browse -rt _uscan._tcp

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

> But xsane reports "Failed......

Your printing is set up without HPLIP, so , as it stands, that software is useless to you. Remove it with

apt purge
apt --purge autoremove
rm -r /usr/share/hplip
rm /var/lib/hp/hplip.state

Find a Ubuntu Cosmic archive and download the 3.18.7 versions of libsane-hpaio and libhpmud0. Install with

dpkg -i libsane-hpmud0...deb
dpkg -i libsane-hpaio....deb

Now try 'scanimage -L' and 'scanimage -d URI_of_scanner > image.pnm'.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

Now for this plugin business.

> scanimage[16355]: common/utils.c 157: Plugin version is not matching

No plugin should be required according to

https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

and what is in models.dat. I do not know what is going on. But, if it is really needed

1. Download the appropriate file to a chosen directory from

    https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

2. sh hplip-<version>-plugin.run --tar vxf

3. python installPlugin.py

Again try 'scanimage -L' and 'scanimage -d URI_of_scanner > image.pnm'.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

I forgot to say: the scanimage command should also be tried without the -d option both times,

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

@ Comment #9

After adding the printer ID to /usr/share/hplip/data/models/models.dat scanimage -L reports a scanner with URI

  device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one

And running

  avahi-browse -rt _uscan._tcp

returns

  + wlp2s0 IPv6 HP Color LaserJet MFP M281fdw (5DAA8E) _uscan._tcp local
  + wlp2s0 IPv4 HP Color LaserJet MFP M281fdw (5DAA8E) _uscan._tcp local
  = wlp2s0 IPv6 HP Color LaserJet MFP M281fdw (5DAA8E) _uscan._tcp local
     hostname = [NPI5DAA8E.local]
     address = [192.168.0.88]
     port = [8080]
     txt = ["note=" "duplex=F" "is=platen,adf" "cs=color,grayscale"
  "pdl=application/pdf,image/jpeg" "uuid=564e424e-4c43-5846-3653-e4e7495daa8e" "rs=eSCL"
  "representation=http://NPI5DAA8E.local./ipp/images/printer.png" "vers=2.63" "usb_MDL=HP
  ColorLaserJet MFP M278-M281" "usb_MFG=HP" "mdl=ColorLaserJet MFP M278-M281" "mfg=HP" "ty=HP
  ColorLaserJet MFP M278-M281" "adminurl=http://NPI5DAA8E.local." "txtvers=1"]
  = wlp2s0 IPv4 HP Color LaserJet MFP M281fdw (5DAA8E) _uscan._tcp local
     hostname = [NPI5DAA8E.local]
     address = [192.168.0.88]
     port = [8080]
     txt = ["note=" "duplex=F" "is=platen,adf" "cs=color,grayscale"
  "pdl=application/pdf,image/jpeg" "uuid=564e424e-4c43-5846-3653-e4e7495daa8e" "rs=eSCL"
  "representation=http://NPI5DAA8E.local./ipp/images/printer.png" "vers=2.63" "usb_MDL=HP
  ColorLaserJet MFP M278-M281" "usb_MFG=HP" "mdl=ColorLaserJet MFP M278-M281" "mfg=HP" "ty=HP
  ColorLaserJet MFP M278-M281" "adminurl=http://NPI5DAA8E.local." "txtvers=1"]

[I did not find any documentation which kind of Markup is used by bugs.launchpad.net, so maybe above is formatted in a bad way.]

Revision history for this message
Peter Schüller (schueller-p) wrote :

@ Comment #10

I did

  apt purge libsane-hpaio libhpmud0 hplip-data hplip printer-driver-postscript-hp

Then I installed the comic packages from https://packages.ubuntu.com/cosmic/amd64/libsane-hpaio/download and https://packages.ubuntu.com/cosmic/amd64/libhpmud0/download

Then I tried scanimage -L but again the ID was missing from the models.dat, so I added it, this time I found my printer model in the models.dat but with initial "hp_" so I copied it and removed the "hp_" from the name in [].

Then scanimage -L shows an URI "hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88&queue=false"

If I use that URI with scanimage -d (or without -d) <URI> (quoting the &) I get a line in the journal saying "unable to load library libm.so" and "unable to open /var/lib/hp/hplip.state" and "Plugin version is not matching" as described above.

The output of scanimage -d is

  scanimage: open of device hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88&queue=false failed: Error during device I/O

models.dat contains for that model

  plugin=0
  plugin-reason=0

so maybe no plugin is needed after all.

Revision history for this message
brian_p (claremont102) wrote :

> After adding the printer ID to /usr/share/hplip/data/models/models.dat
> scanimage -L reports a scanner with URI
>
> device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88&queue=false'
> is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one

Fine. It can only (obviously?) report this if [colorlaserjet_mfp_m278-m281] is found in models.dat.

The formatting was also fine and sufficient to show that _uscan._tcp (which is the important service for this device) has

   ty=HP ColorLaserJet MFP M278-M281

The mdns discovery done by mdns.c removes the first three characters and looks for

   ColorLaserJet MFP M278-M281

in models.dat. This exists because you put it there. Otherwise it would not exist and the scanning function would be unavailable.

Thanks for the confirmation.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

> I did
>
> apt purge libsane-hpaio libhpmud0 hplip-data hplip printer-driver-postscript-hp

*Everything* associated with HPLIP has to go. That particularly includes /usr/share/hplip/ and /var/lib/hp. Leaving anything on the system gives it a chance to complain. I think there may even be files in /etc/hplip and $HOME/.hplip. 'apt purge hplip' is a good starting point.

This should also get rid of anything the installer for hplip-3.19.1 put there but, because I am not familiar with the .run file, I am a little unsure about all the files it installs. I believe it has an uninstall script.

I am expecting that

  scanimage -d hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88

or

  xsane -d hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88

should work after doing this.

(I do not think &queue=false is important).

I am still puzzled by any need for a plugin. But it can be tried. If it comes to it, installing it won't do any harm.

Revision history for this message
brian_p (claremont102) wrote :

Apologies: I have just noticed I put

  apt purge

in a previous post.

That should have been

  apt purge hplip

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

> apt purge hplip

Yes, I did that, it was part of my huge purge command.

Just to clarify: the file /usr/share/hplip/data/models/models.dat should also go away?

If that is gone, scanimage -d URI reports "no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/models.dat"

If the file is present, scanimage -d URI reports "failed: Operation not supported" and the journal shows two puzzling messages:

> io/hpmud/jd.c 214: invalid uri model colorlaserjet_mfp_m278-m281 != HP_ColorLaserJet_MFP_M278-M281
> scan/sane/soapht.c 481: unable to open device hp:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88

I will next try to install the plugin.

Revision history for this message
Peter Schüller (schueller-p) wrote :

Installing the following packages from Cosmic re-produced the plugin libm problem:

hplip_3.18.7+dfsg1-2ubuntu2_amd64.deb
hplip-data_3.18.7+dfsg1-2ubuntu2_all.deb
libhpmud0_3.18.7+dfsg1-2ubuntu2_amd64.deb
libsane-hpaio_3.18.7+dfsg1-2ubuntu2_amd64.deb
printer-driver-hpcups_3.18.7+dfsg1-2ubuntu2_amd64.deb

Installing the plugin as you suggested removes the problem.

But the issue of

> io/hpmud/jd.c 214: invalid uri model colorlaserjet_mfp_m278-m281 != HP_ColorLaserJet_MFP_M278-M281
> scan/sane/soapht.c 481: unable to open device hp:/net/colorlaserjet_mfp_m278-m281?ip=192.168.0.88

remains.

Revision history for this message
brian_p (claremont102) wrote :

Ok, we have resolved your printing issue but lack of scanning remains. I am mystified.
I have dealt with your printer type previously and met similar problems. Some involvement from HPLIP upstream would be appreciated.

My final advice is to look at

https://bugs.launchpad.net/hplip/+bug/1814307

Sergio Sánchez López reports success in Message #19.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

> Yes, I did that, it was part of my huge purge command.

I should have read more carefully. :(

Just to clarify: the file /usr/share/hplip/data/models/models.dat should also go away?

Yes - but it will be restored whe libsane-hpaio (with or without its recommended packages) is reinstalled.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

Your device has a "Scan to Network Folder" feature. See the manual. It could be useful.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

Hi Peter,

https://bugs.launchpad.net/hplip/+bug/1811504

deals with similar issues to yours. Some advice was given in Message #26. Lucazade got in working for his scanner in Message #31.

--
Brian.

Revision history for this message
brian_p (claremont102) wrote :

Peter,

Did you ever try

scanimage -d hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.0.88 > image.pnm ?

(I am assuming you have [hp_colorlaserjet_mfp_m278-m281] as the header of a section).

Please post what you get for

avahi-browse -rt _ipp._tcp

--
Brian.

Revision history for this message
Peter Schüller (schueller-p) wrote :

I tried this before, but not recently.

I now tried it and it works! scanimage returns an image and xsane also detects the scanner.

What I did:
* add ubuntu "disco" sources as an extra source with lower apt priority
* install packages hplip-data libhpmud0 libsane-hpaio printer-driver-hpcups sane-utils from "disco" - in disco, hplip has version 3.19.1
* I had hplip installed, but this broke my apt because of the dependency to a python that is not in "bionic"
* I might have installed the plugin of hplip 3.19.1 in addition to using hplip installer script and python installPlugin.py as you described above

After that and using your scanimage command, there is success!

I still get the libm messages in the journal:

xsane[4229]: common/utils.c 245: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header
scanimage[4145]: common/utils.c 245: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header

Interestingly, this bug has been closed in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900025

$ avahi-browse -rt _ipp._tcp
+ wlp2s0 IPv6 HP Color LaserJet MFP M281fdw (5DAA8E) Internet Printer local
+ wlp2s0 IPv4 HP Color LaserJet MFP M281fdw (5DAA8E) Internet Printer local
= wlp2s0 IPv6 HP Color LaserJet MFP M281fdw (5DAA8E) Internet Printer local
   hostname = [NPI5DAA8E.local]
   address = [192.168.0.88]
   port = [631]
   txt = ["mopria-certified=1.3" "print_wfds=T" "mac=e4:e7:49:5d:aa:8e" "usb_MDL=HP ColorLaserJet MFP M278-M281" "usb_MFG=HP" "TLS=1.2" "PaperMax=legal-A4" "kind=document,envelope,photo" "UUID=564e424e-4c43-5846-3653-e4e7495daa8e" "Fax=T" "Scan=T" "Duplex=T" "Color=T" "note=" "adminurl=http://NPI5DAA8E.local./hp/device/info_config_AirPrint.html?tab=Networking&menu=AirPrintStatus" "priority=10" "product=(HP ColorLaserJet MFP M278-M281)" "ty=HP ColorLaserJet MFP M278-M281" "URF=V1.4,CP99,W8,OB10,PQ3-4-5,ADOBERGB24,DEVRGB24,DEVW8,SRGB24,DM1,IS1,MT1-2-3-5-12,RS600" "rfo=ipp/faxout" "rp=ipp/print" "pdl=image/urf,application/PCLm,application/octet-stream,application/pdf,application/postscript,application/vnd.hp-PCL,application/vnd.hp-PCLXL,image/jpeg" "qtotal=1" "txtvers=1"]
= wlp2s0 IPv4 HP Color LaserJet MFP M281fdw (5DAA8E) Internet Printer local
   hostname = [NPI5DAA8E.local]
   address = [192.168.0.88]
   port = [631]
   txt = ["mopria-certified=1.3" "print_wfds=T" "mac=e4:e7:49:5d:aa:8e" "usb_MDL=HP ColorLaserJet MFP M278-M281" "usb_MFG=HP" "TLS=1.2" "PaperMax=legal-A4" "kind=document,envelope,photo" "UUID=564e424e-4c43-5846-3653-e4e7495daa8e" "Fax=T" "Scan=T" "Duplex=T" "Color=T" "note=" "adminurl=http://NPI5DAA8E.local./hp/device/info_config_AirPrint.html?tab=Networking&menu=AirPrintStatus" "priority=10" "product=(HP ColorLaserJet MFP M278-M281)" "ty=HP ColorLaserJet MFP M278-M281" "URF=V1.4,CP99,W8,OB10,PQ3-4-5,ADOBERGB24,DEVRGB24,DEVW8,SRGB24,DM1,IS1,MT1-2-3-5-12,RS600" "rfo=ipp/faxout" "rp=ipp/print" "pdl=image/urf,application/PCLm,application/octet-stream,application/pdf,application/postscript,application/vnd.hp-PCL,application/vnd.hp-PCLXL,image/jpeg" "qtotal=1" "txtvers=1"]

Thank you!

Revision history for this message
brian_p (claremont102) wrote :

> After that and using your scanimage command, there is success!

Excellent.

> Interestingly, this bug has been closed in
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900025

The bug submitter could not reproduce his issue and asked for it to be closed. The triager saw no reason not to comply.

From 'avahi-browse -rt _ipp._tcp':

  ty=HP ColorLaserJet MFP M278-M281

This means the section header in models.dat is correct. However, mdns discovery of the scanner URI triggers

  https://bugs.launchpad.net/hplip/+bug/1797501

Thanks for sticking with it, Peter, and for all your help.

--
Brian.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.