No command found after hplip install
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-
hplip-printer-
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/
hplip-doc/
hplip-gui/
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
|
#1 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#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:/
>
> 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
|
#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
|
#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:/
Revision history for this message
|
#7 |
What happens when you open a terminal window and type the command
hp-scan
Revision history for this message
|
#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-
hplip-printer-
hplip-printer-
hp-plugin-ubuntu
Which is a bit more than in the OP, I'll admit that.
Revision history for this message
|
#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
|
#10 |
$ LANG=C sudo apt install --reinstall hplip
done and same.
$ ls -l /usr/bin/hp-*
https:/
$ which hp-scan
(nothing)
My PATH is : /usr/local/
Revision history for this message
|
#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
|
#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
|
#13 |
models.dat is provided by another package.
Try
sudo apt install --reinstall libsane-hpaio
Revision history for this message
|
#14 |
Package reinstalled. (0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded)
Same error.
Revision history for this message
|
#15 |
What is the output of
ls -l /usr/share/
Revision history for this message
|
#16 |
-rw-r--r-- 1 root root 1178923 Mar 7 2018 /usr/share/
And here is the file: https:/
Revision history for this message
|
#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
|
#18 |
Damn. Thank you for trying. Let's hope someone else passes by.
Revision history for this message
|
#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
|
#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-
ii printer-
ii printer-
ii usb-modeswitch 2.5.2+repack0-
Revision history for this message
|
#21 |
My suggestion:
sudo apt purge --autoremove hplip hplip-data hplip-gui libhpmud0:amd64 libsane-hpaio:amd64 printer-
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
|
#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.
/sys/fs/
/sys/fs/
/sys/fs/
/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
|
#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-
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
|
#24 |
Interesting discussion about the hplip-printer-
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
|
#25 |
Snap package removed and hplip installed again indeed.
My printer is wifi connected, its name is HP_ENVY_
Error still there.
Revision history for this message
|
#26 |
If the connection is via WLAN, then you should try sane-airscan, see https:/
Revision history for this message
|
#27 |
I installed sane-airscan from repository http://
Revision history for this message
|
#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
|
#29 |
COMMANDS OUTPUT
$ airscan-discover
[devices]
HP ENVY Photo 6200 series [887A29] = http://
HP ENVY Photo 6200 series [887A29] = https:/
HP ENVY Photo 6200 series [887A29] = http://[2a01:e0a:
HP ENVY Photo 6200 series [887A29] = http://
$ scanimage -L
device `hpaio:
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:/
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.