Bug 1193335

Summary: HP plugin download and install errors: wrong checksum, Python3 vs Python2 problem
Product: [openSUSE] openSUSE Distribution Reporter: Mindaugas Baranauskas <opensuse.lietuviu.kalba>
Component: PrintingAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED DUPLICATE QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P5 - None CC: martin.wilck, opensuse.lietuviu.kalba
Version: Leap 15.3Flags: martin.wilck: needinfo? (opensuse.lietuviu.kalba)
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Mindaugas Baranauskas 2021-12-02 16:21:28 UTC
My printer needs HP plugin for HPLIP. In openSUSE Leap 15.3 I have installed HPLIP 3.20.11.
When I try to print, GUI dialog appeared to install missing plugin. I went throw wizard and selected to download it. But when I try to download/install it, I get the following error:

.hplip/hplip-3.20.11-plugin.run file does not match its checksum. File may have been corrupted or altered

Later I manually managed to download it from 
https://developers.hp.com/sites/default/files/hplip-3.20.11-plugin.run 

Executing it failed:

> sudo sh hplip-3.20.11-plugin.run 
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.11 Plugin Self Extracting Archive..............................................................
Error importing HPLIP modules.  Is HPLIP installed?

Only later I found this error because of python2 usage instead of python3 for execution of plugin_install.py via hplip-plugin-install.


Thus workaround was:
wget https://developers.hp.com/sites/default/files/hplip-3.20.11-plugin.run
sh ./hplip-3.20.11-plugin.run --nox11 --target mydir
cd mydir
sudo python3 ./plugin_install.py -i
Comment 1 Johannes Meixner 2022-01-21 12:32:05 UTC
I don't have a printer that needs non-free software
so I cannot reproduce issues with non-free stuff in HPLIP.

Perhaps the section
"The plugin version must match the HPLIP version" in
https://en.opensuse.org/SDB:How_to_set-up_a_HP_printer
might provide further hints.

In general my personal recommendation is to not buy printers
that do not support a standard printer language, cf.
https://en.opensuse.org/SDB:Printer_buying_guide

In general regarding HPLIP:

HPLIP is developed by HP.

We (i.e. openSUSE) distribute HP's HPLIP software "as is"
but we do not develop it, cf.
https://en.opensuse.org/SDB:How_to_set-up_a_HP_printer

Issues with HPLIP are usually upstream issues
that should be reported directly to HP via
https://developers.hp.com/hp-linux-imaging-and-printing/support

Accordingly issues with HPLIP are usually closed as "upstream",
cf. "Background Information" in
https://en.opensuse.org/SDB:How_to_Report_a_Printing_Issue

It is known that HPLIP upstream issues may sometimes
take a rather long time until they get fixed by HP.

For some more details about HPLIP and Linux distributions
in general you may read through the whole bug #1187232
but only if you like to read about endless frustrating stuff ;-)
Comment 2 Martin Wilck 2022-01-21 16:39:28 UTC
Can you please run "hp-plugin -g" (debugging enabled) and provide the output?

You'll probably need to move the currently installed plugin out of the way.
Comment 3 Martin Wilck 2022-01-21 16:50:21 UTC
Please ignore the previous comment.  This is a bug which is known and fixed. Just the update hasn't been released to official repositories yet.

Please use hplip from the "Printing" repository:

> http://download.opensuse.org/repositories/Printing/openSUSE_Leap_15.3/Printing.repo

If you still have issues, please run "hp-plugin -g" in the terminal and capture / provide the output.

*** This bug has been marked as a duplicate of bug 1193656 ***
Comment 5 Mindaugas Baranauskas 2022-01-22 07:59:33 UTC
Thanks! I moved away
/usr/share/hplip/data/firmware
/usr/share/hplip/prnt/plugins
Then updated hplip from 3.20.11 to to 3.21.10 (from Printing repo). Plugin downloaded and installed successfully (no problem with Python).
I encourage provide this as update for openSUSE Leap 15.3

> zypper se -s hplip

S  | Name             | Type             | Version             | Arch   | Repository
---+------------------+------------------+---------------------+--------+-----------
i+ | hplip            | paketas          | 3.21.10-lp153.239.1 | x86_64 | Printing
v  | hplip            | paketas          | 3.20.11-2.1         | x86_64 | Main
   | hplip            | šaltinis paketas | 3.21.10-lp153.239.1 | noarch | Printing
   | hplip-devel      | paketas          | 3.21.10-lp153.239.1 | x86_64 | Printing
   | hplip-devel      | paketas          | 3.20.11-2.1         | x86_64 | Main
i+ | hplip-hpijs      | paketas          | 3.21.10-lp153.239.1 | x86_64 | Printing
v  | hplip-hpijs      | paketas          | 3.20.11-2.1         | x86_64 | Main
i+ | hplip-sane       | paketas          | 3.21.10-lp153.239.1 | x86_64 | Printing
v  | hplip-sane       | paketas          | 3.20.11-2.1         | x86_64 | Main
   | hplip-scan-utils | paketas          | 3.21.10-lp153.239.1 | x86_64 | Printing
   | hplip-scan-utils | paketas          | 3.20.11-2.1         | x86_64 | Main