hp-setup does not find installed proprietary plugin

Bug #1818702 reported by Big Al
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Debian
New
Undecided
Unassigned

Bug Description

I am running Linux Mint 19 and have a HP Color Laserjet MFP m277dw.

When I run the installer (hplip-3.19.1.run but also tried earlier), hp-setup finds the printer and when selected from the "Select from Discovered Devices" page and selecting next, successfully downloads and installs the driver plug-in, but then gives a failure popup "The device you are trying to setup requires a binary plugin. ..." and when cleared the installer goes back to the "Select from Discovered Devices" page.

I also tried installing the plug-in separately (hplip-3.19.1-plugin.run and hplip-3.19.1-plugin.asc, and also just hp-plugin) with the same result. Each time the plugin is installed, it seems to install correctly:
$ ls -l /usr/share/hplip/prnt/plugins/
total 128
lrwxrwxrwx 1 root root 45 Mar 5 16:26 hbpl1.so -> /usr/share/hplip/prnt/plugins/hbpl1-x86_64.so
-rwxr-xr-x 1 root root 49528 Mar 5 16:26 hbpl1-x86_64.so
lrwxrwxrwx 1 root root 42 Mar 5 16:26 lj.so -> /usr/share/hplip/prnt/plugins/lj-x86_64.so
-rwxr-xr-x 1 root root 74496 Mar 5 16:26 lj-x86_64.so

However, these don't appear to be picked up by hp-setup. hp-doctor also thinks there are no plugin installed.

Here is in extract of hp-setup, and attached is the log of hp-check:
...
HP Linux Imaging and Printing System (ver. 3.19.1)
Plugin Download and Install Utility ver. 2.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.

Checking for network connection...
Downloading plug-in from:
Receiving digital keys: /usr/bin/gpg --homedir /home/alexs/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.19.1 Plugin Self Extracting Archive..............................................................

HP Linux Imaging and Printing System (ver. 3.19.1)
Plugin Installer ver. 3.0

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.

Plug-in version: 3.19.1
Installed HPLIP version: 3.19.1
Number of files to install: 64

Done.
 Plug-in installation successful

Done.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.
...

Revision history for this message
Big Al (alex-schuilenburg) wrote :
Revision history for this message
brian_p (claremont102) wrote :
Revision history for this message
Big Al (alex-schuilenburg) wrote :
Download full text (5.1 KiB)

Nope, tried all of the suggestions.

I have both python2.7 and python3.6 installed, and set python with both "alternatives", including running (e.g. for python 3.6):
export PYTHON=/usr/bin/python3
export PYTHONINCLUDEDIR=/usr/include/python3.6
mkdir hplip-3.1.19
cd hplip-3.1.19
sh ~/Downloads/hplip-3.19.1.run --tar vxf
./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-network-build --enable-scan-build --enable-fax-build --enable-dbus-build --enable-qt4 --disable-qt5 --disable-class-driver --enable-doc-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-hpcups-install --disable-hpijs-install --disable-foomatic-ppd-install --disable-foomatic-drv-install --disable-cups-ppd-install --enable-cups-drv-install --enable-apparmor_build
make
sudo make install
rm -rf ~/.hplip
hp-setup

... same result.

I installed manually the plugin:
mkdir hplip-3.19.1-plugin
cd hplip-3.19.1-plugin
sh ~/Downloads/hplip-3.19.1-plugin.run --tar vxf
sudo python3 installPlugin.py
hp-setup

... similar result, specifies binary plugin required, only now it does not offer the download of the binaries.

Although in the console I now see (or maybe oice for the 1st time):
$ hp-setup

HP Linux Imaging and Printing System (ver. 3.19.1)
Printer/Fax Setup Utility ver. 9.0

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.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.
Segmentation fault
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.

The segfault comes after I highlight my printer from the discovered devices and select "Next".

Files still exist in the plugin directory:
$ ls -l /usr/share/hplip/prnt/plugins/
total 128
lrwxrwxrwx 1 root root 45 Mar 6 17:01 hbpl1.so -> /usr/share/hplip/prnt/plugins/hbpl1-x86_64.so
-rwxr-xr-x 1 root root 49528 Mar 6 17:01 hbpl1-x86_64.so
lrwxrwxrwx 1 root root 42 Mar 6 17:01 lj.so -> /usr/share/hplip/prnt/plugins/lj-x86_64.so
-rwxr-xr-x 1 root root 74496 Mar 6 17:01 lj-x86_64.so

Oddly, if I run the /usr/bin/hp-plugin or its target /usr/share/hplip/plugin.py it'll die with:
...
Plug-in version: 3.19.1
Installed HPLIP version: 3.19.1
Number of files to install: 64

Plugin installation failed
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

Done.

But python2 or python3 /usr/share/hplip/plugin.py will not fail:
$ python /usr/share/hplip/plugin.py

HP Linux Imaging and Printing System (ver. 3.19.1)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 200...

Read more...

Revision history for this message
Big Al (alex-schuilenburg) wrote :

I forgot to mention I also tried
python3 /usr/share/hplip/setup.py

which does offer to download and install the binary plugin, and also changed the shebang on /usr/share/hplip/plugin.py to #!/usr/bin/python3

and I get:
Plug-in version: 3.19.1
Installed HPLIP version: 3.19.1
Number of files to install: 64

Plugin installation failed
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

Done.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit http://hplipopensource.com for more infomation.

Done.

Revision history for this message
brian_p (claremont102) wrote :

Your device has an AirPrint service. I would suggest you forget about the problems HPLIP and its plugin is giving you and focus on what is advised in

https://wiki.debian.org/QuickPrintQueuesCUPS#IPP_Printers

The technique is known to work on MINT.

--
Brian.

Revision history for this message
Big Al (alex-schuilenburg) wrote :

Unfortunately with the above technique, while the printer queues etc are configured, most jobs, including the test page, all result in the printer reporting "Unable to print file. File is corrupt". The selt-test page works, not that it does me any good.

In desperation, I tried the postscript route and printed to PDF then spooled the PDF which does print, only 1/8 size.

I finally had to bite the bullet and ask a colleague who runs Windows 10 to print my PDF for me.

This morning though, I configured the printer via CUPS on our Debian 9.8 office server just fine, and even printed the test page without issue, so exported the printer via cups over the network and my Linux Mint picked it up automatically and printing from my Linux Mint 19 Workstation to the HP MFC 277dw is now restored - albeit via another CUPS server on Debian.

What gets me is this used to work. I have been away for a couple of weeks, ran a series of upgrades on my return and suddenly, but sadly not unsurprisingly, it stopped.

If I had time to discover whether my snapshot rollbacks work and figure out what upgrade broke it I would, but for now I'll live with leeching off our office server and have to live down asking my Windows 10 colleague to print for me :-/

Revision history for this message
brian_p (claremont102) wrote :

> What gets me is this used to work. I have been away for
> a couple of weeks, ran a series of upgrades on my return
> and suddenly, but sadly not unsurprisingly, it stopped.

I am really surprised the driverless printing method I recommended did work for you. I use Debian (but have dabbled with Mint, which is essentially based on Debian) and neither that nor HPLIP give me any trouble, which I know is not much comfort to you.

Sorry things did not work out for you. Good luck with the rollbacks.

--
Brian.

Revision history for this message
Roger Whiteley (rogercw1) wrote :

Similar woes - printer worked, then stopped, on version hplip-3.19..; But its a generic problem - affecting 3-18.6 3-18.12 - I am using Debian/sid but nothing I have tried overcomes 'plugin installation failed' - I'm using a P1005 USB printer. Ironically, a networked HP5510 All-in-one which just reported 'filter failed', now works. But that's reporting 3.16.11 driver from the Printer Test Page
I've tried changing the ./configure options and rebuilding - but Alex's posts above at least told me where the binary was supposed to go - in the past I've been using hp-firmware -n from root, which consistently allowed a print to come out. Now, 'filter failed'

Error logs say nothing of interest - no failed directories, no file not found, zip. AM not using a gui on this Debian box, just cli. hp-doctor just reports No plug-in printers are configured, despite hp-setup -i configuring the cups q.
Running hp-setup -i -g returns plugin installation failed, downloads firmware, then reports Exception 4 Unknown/invalid device-uri field during getting list of PPDs using CUPS_GET_PPDS, finds the print queue, then throws another three Exception 4 errors, before dropping into Print Queue Setup
Choosing to add another q generates another three Exception 4 Unknown/invalid device-uri errors before downloading firmware and offering to print a test page, which fails.
Printing a test page from cups - the printer clicks, then the Filter failed message appears with the job.

HP LaserJet p1005, hpcups 3.18.12, requires proprietary plugin (color, 2-sided printing)
Connection: hp:/usb/HP_LaserJet_P1005?serial=BC12DD4
Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided

Thinks it needs colour and can do two sided printing, I don't think so..

Revision history for this message
Roger Whiteley (rogercw1) wrote :

hp-check just crashes in /usr/share/hplip/base/utils.py /etc/PolicyKit - No such file or directory
created a symbolic link ln -s /etc/polkit-1 /etc/PolicyKit -
still crashed, different error.
Made localauthority chmod 777 in polkit-1 instead of just root to test.
hp-check -i now runs, N.B. ./configure was run with policykit DISABLED. So unsure why PolicyKit was being tested.

Tried hp-firmware -n -i -g, this too reports Unknown/invalid device-uri field, but doesn't state where. Printer cycles like it always does, provided there's no failed print job, in which case hp-firmware breaks.

After unbundling plugin as described by Ales - plugin.spec file correctly identifies printer, and driver.
As hp-setup is normally run by normal user with root PW later - the drivers in plugin.spec are correctly installed in /usr/share/hplip/prnt/plugins and the symlinks are correct - so the error report that drivers aren't installed is wrong.
Which implies the connection between the driver and cups is broken.
Did try changing the URI from hp:/usb to hp://usb in printers.conf but made no difference.

Revision history for this message
ktkraemer (kt-kraemer-privat) wrote :

This solution works for me:

please run:
#hp-setup -g &> ~/hp-setup.log

after your error read the log:
#cat ~/hp-setup.log

you will find some lines like:

hp-setup[19265]: debug: Either /usr/lib/i386-linux-gnu/sane/libsane-hp2000S1.so file is not present or symbolic link is missing

if you run:
#locate libsane-hp2000S1

you will get the right place like:

/usr/lib/sane/libsane-hpgt2500-x86_64.so.1.0.22
/usr/lib/sane/libsane-hpgt2500-x86_64.so.1.0.27
/usr/lib/sane/libsane-hpgt2500.so
/usr/lib/sane/libsane-hpgt2500.so.1
/usr/lib/x86_64-linux-gnu/sane/libsane-hpgt2500.so
/usr/lib/x86_64-linux-gnu/sane/libsane-hpgt2500.so.1
/usr/lib64/sane/libsane-hpgt2500-x86_64.so.1.0.22
/usr/lib64/sane/libsane-hpgt2500-x86_64.so.1.0.27
/usr/lib64/sane/libsane-hpgt2500.so
/usr/lib64/sane/libsane-hpgt2500.so.1

now you only have to make a symbolic link:

#sudo ln -s /usr/lib /usr/lib/i386-linux-gnu
#sudo ln -s /usr/lib64 /usr/lib64/x86_64-linux-gnu

run again hp-setup
done

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

Other bug subscribers

Bug attachments

Remote bug watches

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