Can't install HPMIP package on Raspberry

Asked by Francois Ochsenbein on 2020-07-27

Sorry to ask for help, I wanted to install the most recent version of hplip on a Raspberry ; for this I first upgraded my Debian version to the most recent version (10.4) , and my Linux version is now
Linux version 5.4.51-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1327 SMP Thu Jul 23 11:04:39 BST 2020
Alas, the package for the installation seems to be incomplete, running "apt-get install hplip" returns

Selecting previously unselected package hplip.
(Reading database ... 202883 files and directories currently installed.)
Preparing to unpack .../hplip_3.18.12+dfsg0-2+b2_armhf.deb ...
Unpacking hplip (3.18.12+dfsg0-2+b2) ...
Setting up hplip (3.18.12+dfsg0-2+b2) ...
Creating/updating hplip user account...
dpkg-statoverride: warning: --update given but /var/run/hplip does not exist
Can't open /etc/hp/hplip.conf: No such file or directory.
Can't open /etc/hp/hplip.conf: No such file or directory.
Processing triggers for dbus (1.12.16-1) ...
Processing triggers for man-db (2.8.5-2) ...

and moreover the /usr/bin/hp-* links created point to non-existent python scripts like
/usr/bin/hp-setup -> ../share/hplip/setup.py

What can be wring there ? The apt sources.list is
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Thank you for any help !

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Francois Ochsenbein
Solved:
2020-07-28
Last query:
2020-07-28
Last reply:
2020-07-28
Manfred Hampl (m-hampl) said : #1

The "missing" files are in other packages (hplip-data and libsane-hpaio) which are dependencies of hplip.
I have no idea why they can be missing on your system.

Maybe you should try reinstalling them.

Francois Ochsenbein (f0x1) said : #2

Thank you Manfred, I did remove + purge the whole packages (with -data and libsane-hpaio) and re-install everything several times already, always the same error... The error did not exist in an earlier Debian versions (10.0).

I imagine the error can be in the creation of the deb file

-rw-r--r-- 1 root root 276248 déc. 21 2018 /var/cache/apt/archives/hplip_3.18.12+dfsg0-2+b1_armhf.deb
-rw-r--r-- 1 root root 276220 avril 25 19:22 /var/cache/apt/archives/hplip_3.18.12+dfsg0-2+b2_armhf.deb
-rw-r--r-- 1 root root 6742264 déc. 10 2018 /var/cache/apt/archives/hplip-data_3.18.12+dfsg0-2_all.deb
-rw-r--r-- 1 root root 671528 déc. 10 2018 /var/cache/apt/archives/hplip-doc_3.18.12+dfsg0-2_all.deb
-rw-r--r-- 1 root root 100852 déc. 10 2018 /var/cache/apt/archives/hplip-gui_3.18.12+dfsg0-2_all.deb

and it looks like a single file is really new in the last version of Debian...

Manfred Hampl (m-hampl) said : #3

Looking at the control file of the hplip package shiws that the different version number are ok..

Package: hplip
Version: 3.18.12+dfsg0-2+b2
...
Depends:
hplip-data (= 3.18.12+dfsg0-2),
libhpmud0 (= 3.18.12+dfsg0-2+b2),
libsane-hpaio (= 3.18.12+dfsg0-2+b2),
printer-driver-hpcups (= 3.18.12+dfsg0-2+b2)
...

If you install hplip-data and libsane-hpaio, do the files /etc/hp/hplip.conf and /usr/share/hplip/setup.py exist?

And if you install hplip afterwards, does the install process still complain about missing files?

Francois Ochsenbein (f0x1) said : #4

No complain about missing files, but the following:

1) sudo apt-get install libsane-hpaio results in:
The following additional packages will be installed:
  hplip
Suggested packages:
  hplip-gui
The following NEW packages will be installed:
  hplip libsane-hpaio
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/475 kB of archives.
After this operation, 1968 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libsane-hpaio:armhf.
(Reading database ... 202870 files and directories currently installed.)
Preparing to unpack .../libsane-hpaio_3.18.12+dfsg0-2+b2_armhf.deb ...
Unpacking libsane-hpaio:armhf (3.18.12+dfsg0-2+b2) ...
Selecting previously unselected package hplip.
Preparing to unpack .../hplip_3.18.12+dfsg0-2+b2_armhf.deb ...
Unpacking hplip (3.18.12+dfsg0-2+b2) ...
Setting up libsane-hpaio:armhf (3.18.12+dfsg0-2+b2) ...
Setting up hplip (3.18.12+dfsg0-2+b2) ...
Creating/updating hplip user account...
dpkg-statoverride: warning: --update given but /var/run/hplip does not exist
Processing triggers for dbus (1.12.16-1) ...
Processing triggers for man-db (2.8.5-2) ...

... strange warning about /var/run/hplip ?

After this, the /usr/share/hplip directory is created with contents:

ls -lR /usr/share/hplip
/usr/share/hplip:
total 4
drwxr-xr-x 3 root root 4096 Jul 27 20:19 data

/usr/share/hplip/data:
total 4
drwxr-xr-x 2 root root 4096 Jul 27 20:19 models

/usr/share/hplip/data/models:
total 1180
-rw-r--r-- 1 root root 1204938 Dec 10 2018 models.dat

i.e/ only the data file.

2) sudo apt-get install hplip-data gives the result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
hplip-data is already the newest version (3.18.12+dfsg0-2).
hplip-data set to manually installed.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

i.e. nothing done.

3) sudo apt-get install hplip
Reading package lists... Done
Building dependency tree
Reading state information... Done
hplip is already the newest version (3.18.12+dfsg0-2+b2).
hplip set to manually installed.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

i.e. nothing done again ! And /usr/bin contains 34 orphan links like

lrwxrwxrwx 1 root root 23 Dec 10 2018 /usr/bin/hp-setup -> ../share/hplip/setup.py

Installing the hplip-gui afterward does not improve the situation.

An idea of what can go wrong ? Trying dpkg -c on the 2 .deb files, both contain the links, but none the python scripts (the link targets). A bad packaging ?

Manfred Hampl (m-hampl) said : #5

How do you know that /usr/bin/hp-setup is an orphan link?
What happens if you execute
/usr/bin/hp-setup

Francois Ochsenbein (f0x1) said : #6

Simply after the execution of "apt-get install hplip", 34 links are created in /usr/bin like

>ls -l /usr/bin/hp-*
lrwxrwxrwx 1 root root 23 Dec 10 2018 /usr/bin/hp-align -> ../share/hplip/align.py
lrwxrwxrwx 1 root root 23 Dec 10 2018 /usr/bin/hp-check -> ../share/hplip/check.py
...

but the link targets (like /usr/share/hplip/align.py) are not created:

>ls -lL /usr/bin/hp-*
ls: cannot access '/usr/bin/hp-align': No such file or directory
ls: cannot access '/usr/bin/hp-check': No such file or directory

...and of course an error occurs when trying to execute :

>hp-align
-bash: hp-align: command not found

Manfred Hampl (m-hampl) said : #7

/usr/share/hplip/align.py and .../check.py are in the package hplip-data.

I already suggested in my first commant that you should reinstall that package. Have you already done this?

sudo apt-get install --reinstall hplip-data

Francois Ochsenbein (f0x1) said : #8

You are right ! The apt-get reinstall hplip-data does the job ! Thank you a lot !

But I don't understand why all my previous attempts failed... And I'll remember the reinstall trick for package components :-)

I'm marking the problem as solved :-)