No command found after hplip install

Asked by pHneutre

I had hlip installed for months and I used hp-scan on a regular basis. All of a sudden, hp-scan command was not found anymore, neither was any hp- command except:
hplip-printer-application.run-ippeveprinter
hplip-printer-application.run-ippprint

I uninstalled hplip (sudo apt-get remove hplip) and reinstalled it (sudo apt-get install hplip), no error shown, but same behavior. I am still able to print. Please assist, I cannot scan anymore.

OS: Ubuntu 18.04.6 LTS
HLIP packages:
hplip/bionic,now 3.17.10+repack0-5 amd64 [configuration restante]
hplip-data/bionic,bionic,now 3.17.10+repack0-5 all [installé]
hplip-doc/bionic,bionic 3.17.10+repack0-5 all
hplip-gui/bionic,bionic 3.17.10+repack0-5 all

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
pHneutre
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
pHneutre (ph142857) said :
#2

I don't have any more information and I still have the issue. Please assist.

Le 01/11/2021 à 09:55, Launchpad Janitor a écrit :
> Your question #699128 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/699128
>
> Status: Open => Expired
>
> Launchpad Janitor expired the question:
> This question was expired because it remained in the 'Open' state
> without activity for the last 15 days.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What output do you receive for the commands

uname -a
lsb_release -crid
sudo dpkg --audit
sudo apt install hplip-gui

Revision history for this message
pHneutre (ph142857) said :
#4

Hi Manfred, thanks for your answer. Here is your order:

$ uname -a
Linux phoenixorder 4.15.0-161-generic #169-Ubuntu SMP Fri Oct 15 13:41:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

$ sudo dpkg --audit
(nothing)

$ sudo appt install hplip-gui
https://pastebin.com/ZkUpNYVZ (system output is in french, I translated the important parts with --comments)

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Does hp-scan work now?

Revision history for this message
pHneutre (ph142857) said :
#6

No, nothing changed.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

What happens when you open a terminal window and type the command

hp-scan

Revision history for this message
pHneutre (ph142857) said :
#8

Command not found. As I said in the OP, when I type hp then tab to see the suggestions, there isn't much. Now it goes:

hplip-printer-application.run-deviced
hplip-printer-application.run-ippeveprinter
hplip-printer-application.run-ippprint
hp-plugin-ubuntu

Which is a bit more than in the OP, I'll admit that.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

This is strange.

What output do you receive for the following commands (to be executed in a terminal window)

LANG=C sudo apt install --reinstall hplip
ls -l /usr/bin/hp-*
which hp-scan
echo $PATH

Revision history for this message
pHneutre (ph142857) said :
#10

$ LANG=C sudo apt install --reinstall hplip
done and same.

$ ls -l /usr/bin/hp-*
https://pastebin.com/2U3Ynvis

$ which hp-scan
(nothing)

My PATH is : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

What output do you receive for

ls -lL /usr/bin/hp-scan

If it shows an error, then execute

LANG=C sudo apt install --reinstall hplip-data

and try again.

Revision history for this message
pHneutre (ph142857) said :
#12

No such file or directory for the target of the symlink. Actually, even /usr/share/hplip does not exist.

Installing hplip-data made all the commands available again (hurray!). But hp-scan outputs:
error: Unable to locate models.dat file

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

models.dat is provided by another package.
Try

sudo apt install --reinstall libsane-hpaio

Revision history for this message
pHneutre (ph142857) said :
#14

Package reinstalled. (0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded)
Same error.

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

What is the output of

ls -l /usr/share/hplip/data/models/models.dat

Revision history for this message
pHneutre (ph142857) said :
#16

-rw-r--r-- 1 root root 1178923 Mar 7 2018 /usr/share/hplip/data/models/models.dat
And here is the file: https://lufi.ethibox.fr/r/jvbUyUmarL#Goa96qL4hK46FQU2u+Vpgo6JpQBFy8yqk/z/LCU0gbI=

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

I am sorry. I am at my wits' end. I do not understand why you get the error message "Unable to locate models.dat file" if the file is there.

Revision history for this message
pHneutre (ph142857) said :
#18

Damn. Thank you for trying. Let's hope someone else passes by.

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

There is one more idea:
Uninstall everything related to hplip, delete all remaining files (if any) and do a new installation of the hplip packages.

What is the output of

dpkg -l | grep repack0

Revision history for this message
pHneutre (ph142857) said :
#20

Should I apt-get remove all these packages then?

ii hplip 3.17.10+repack0-5 amd64 HP Linux Printing and Imaging System (HPLIP)
ii hplip-data 3.17.10+repack0-5 all HP Linux Printing and Imaging - data files
ii hplip-gui 3.17.10+repack0-5 all HP Linux Printing and Imaging - GUI utilities (Qt-based)
ii libhpmud0:amd64 3.17.10+repack0-5 amd64 HP Multi-Point Transport Driver (hpmud) run-time libraries
ii libsane-hpaio:amd64 3.17.10+repack0-5 amd64 HP SANE backend for multi-function peripherals
ii printer-driver-hpcups 3.17.10+repack0-5 amd64 HP Linux Printing and Imaging - CUPS Raster driver (hpcups)
ii printer-driver-postscript-hp 3.17.10+repack0-5 all HP Printers PostScript Descriptions
ii printer-driver-pxljr 1.4+repack0-5 amd64 printer driver for HP Color LaserJet 35xx/36xx
ii usb-modeswitch 2.5.2+repack0-2ubuntu1 amd64 mode switching tool for controlling "flip flop" USB devices

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

My suggestion:

sudo apt purge --autoremove hplip hplip-data hplip-gui libhpmud0:amd64 libsane-hpaio:amd64 printer-driver-hpcups printer-driver-postscript-hp

Then check for any files that have been left over
find / -ipath '*hplip*' -ls 2>/dev/null
Carefully check whether there are any files still left that should be deleted

Finally re-install the hplip packages

sudo apt install hplip-gui

Revision history for this message
pHneutre (ph142857) said :
#22

All the remaining files are related to snap packages. I don't remember installing a snap HP package, so maybe we're onto something here. Snap has been a pain in the neck ever since it came into existence.

Folders involved in the output of the find command:

/tmp/snap.hplip-printer-application
/sys/fs/cgroup/freezer/ (all snap-hplip-* files)
/sys/fs/cgroup/devices/system.slice (same)
/sys/fs/cgroup/pids/system.slice (same)
/run/snapd/ns/

My command lines skills and time are quite limited, can you please tell me how to auto remove the files listed by the find command? Something involving a pipe and the rm command I guess, or the exec option...

Revision history for this message
pHneutre (ph142857) said :
#23

Wait, if a snap HP package has indeed been installed, there should be a simpler way to remove it. I'm trying snap remove hplip-printer-application.
It worked, the error message disappeared for hp-scan. But I get this one:
error: No device selected/specified or that supports this functionality.

However, my printer is still there and I just printed something.

Revision history for this message
Manfred Hampl (m-hampl) said :
#24

Interesting discussion about the hplip-printer-application snap package at https://forum.snapcraft.io/t/please-pull-hplip-printer-application-from-the-store/20488
It seems that it has already been removed form the snapcradt.io app store.

What is now the status?
The snap package is removed and HPLIP is installed again?

What model is your print/scan device and how is it connected to your computer?

If it is plugged in via USB, what is the output of

sane-find-scanner

Revision history for this message
pHneutre (ph142857) said :
#25

Snap package removed and hplip installed again indeed.
My printer is wifi connected, its name is HP_ENVY_Photo_6200_series_887A29_.
Error still there.

Revision history for this message
Manfred Hampl (m-hampl) said :
#26

If the connection is via WLAN, then you should try sane-airscan, see https://wiki.debian.org/SaneOverNetwork#escl

Revision history for this message
pHneutre (ph142857) said :
#27

I installed sane-airscan from repository http://download.opensuse.org/repositories/home:/pzz/xUbuntu_18.04/ as described here https://github.com/alexpevzner/sane-airscan#readme ; the install seems to go smooth but the sane-airscan command is not found. If I understand correctly https://manpages.debian.org/bullseye/sane-airscan/sane-airscan.5.en.html it should be found.

Revision history for this message
Manfred Hampl (m-hampl) said :
#28

"the sane-airscan command is not found."

This was a misinterpretation. the command to use isn't sane-airscan.

Run the commands
airscan-discover
scanimage -L

and if it lists your scanner. then use this scanner address in the command
simplescan "scanner-address"
(e.g. something like simple-scan "airscan:e3:HP ENVY Photo 7800 series [C87A60]")

Revision history for this message
pHneutre (ph142857) said :
#29

COMMANDS OUTPUT

$ airscan-discover
[devices]
  HP ENVY Photo 6200 series [887A29] = http://192.168.1.101:8080/eSCL/, eSCL
  HP ENVY Photo 6200 series [887A29] = https://192.168.1.101:443/eSCL/, eSCL
  HP ENVY Photo 6200 series [887A29] = http://[2a01:e0a:2e3:4500:aee2:d3FF:Fe88:7a29]:53048, WSD
  HP ENVY Photo 6200 series [887A29] = http://192.168.1.101:53048, WSD

$ scanimage -L
device `hpaio:/net/envy_photo_6200_series?ip=192.168.1.101&queue=false' is a Hewlett-Packard envy_photo_6200_series all-in-one
device `airscan:e0:HP ENVY Photo 6200 series [887A29]' is a eSCL HP ENVY Photo 6200 series [887A29] ip=192.168.1.101

simplescan is not recognized, I guess you meant simple-scan.
$ simple-scan "airscan:e0:HP ENVY Photo 6200 series [887A29]"
nothing (runs forever)

2) SIMPLE SCAN GUI TOOL
But thanks to simple-scan I just discovered that I have a (new ?) GUI tool, which works well: I am able to scan with the GUI.

3) HP-SCAN
Before the above commands, hp-scan gave:
error: Unable to locate device airscan:w0:HP ENVY Photo 6200 series [887A29] using SANE backend hpaio:. Please check HPLIP installation.
And now it works. It prompts:
Num Scan device URI
  -------- --------------------------------------------------------------
  0 hpaio:/net/envy_photo_6200_series?ip=192.168.1.101&queue=false
  1 airscan:e0:HP ENVY Photo 6200 series [887A29]

Enter number 0...1 for device (q=quit) ?

Either I choose 0 or 1 it works.
To be frank I'm at loss about what happened and how we fixed it, which is frustrating, but I'm able to scan now, so thanks a lot.