5

I am trying to set up my HP LaserJet P1102 on Ubuntu 19.04.

I know the theoretical procedure to install the printer, but this procedure does not work for me, following the "correct" procedure to install the printer (the software + the plugin) fails as follows.

I have downloaded and installed hplip 3.19.5 from here.

At first the installation seems to succeed. It asks for plugin to be installed, then it says "Plugin installation successful". But after I click OK on this message, it returns to the window in which I should choose which printer to install, and another message pops up:

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.

error: hp-setup failed. Please run hp-setup manually.

robertspierre
  • 1,084
  • 1
  • 11
  • 28

5 Answers5

5

Same here. I solved this way:

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

  • 3
    Thank you, that was the problem. On a side note, you can run cat hp-setup.log | grep "file is not present" to discover exactly which files are not found. For me, the line to run was sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64. For some reasons, hp-lip seems to look for the libraries into /usr/lib64/x86_64-linux-gnu instead of the correct /usr/lib/x86_64-linux-gnu. May it is worth to report that as a bug. – robertspierre Jul 21 '19 at 09:27
  • 1
    It seems that bug was already reported as https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1825717 . So HPLIP from Ubuntu 19.04 deb-package is buggy (it is other bug I have reported now). – N0rbert Jul 21 '19 at 09:47
  • Thank you so much, I don't know why this worked, but it did. Good job boys! – Boris Valderrama Nov 11 '20 at 08:24
5

I also had the problem where the HP printer installs fine but the scanner plugin does not install (Ubuntu 19).Disabling the plugin.py worked!!! (thank you) but I had to install apparmor-utils first.

sudo apt install apparmor-utils
sudo aa-disable /usr/share/hplip/plugin.py
hp-plugin

The last step runs the HP Plugin installer which is needed for printer scanning to work.

  • same issue on Ubuntu 22.04 and this fixed it | Wiki: "AppArmor is a Linux kernel security module that allows the system administrator to restrict programs' capabilities with per-program profiles.". Standard repo, no extra repos needed. Ubuntu page on AppArmor: https://ubuntu.com/server/docs/security-apparmor ; apparmor-utils is an official sub-package. – jave.web Feb 11 '24 at 12:53
1

I had a slightly different problem. My HP Printer installed fine, but the scanner plugin would not install properly. It seems the trick was to get AppArmor to lower its shields for a Python script.

Edit: Looking at other answers, it looks like it is common to not have AppArmor utils installed, so you may also need to install it first

sudo apt install apparmor-utils

sudo aa-disable /usr/share/hplip/plugin.py

After I did this, the plugin installed correctly.

bfris
  • 109
0

After following Kai Kramer's answer here I got:

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

AND

cannot access '/var/lib/hp/hplip.state': No such file or directory

A search on the web got me to try the following and it worked:

$ aa-disable /usr/share/hplip/plugin.py

Command 'aa-disable' not found, but can be installed with:

sudo apt install apparmor-utils

Install apparmor utils (mind you I didn't have it installed!!!)

sudo apt-get install apparmor-utils

Then run

sudo aa-disable /usr/share/hplip/plugin.py

& the run as normal user, not as root:

hplip-plugin

Now my printer (laserjet 1020) was installed.

Source: https://bugs.launchpad.net/hplip/+bug/1813768

Jadeye
  • 2,032
0

Had the same issue for setting up printer HP P1006 in Ubuntu 22.04 Solved by this answer https://forums.opensuse.org/showthread.php/552897-Hplip-plugin-checksum-error

cd
wget https://developers.hp.com/sites/default/files/hplip-3.22.6-plugin.run -O hplip-3.22.6-plugin.run
wget https://developers.hp.com/sites/default/files/hplip-3.22.6-plugin.run.asc -O hplip-3.22.6-plugin.run.asc
hp-plugin --plugin=~/ -i