plugin installation issue

Asked by Willi Wichtig

OpenSuse 15.2
LaserJet M1212nf MFP

Note: The whole setup worked fine until openSuse 15.1, after upgrading to 15.2 the issue occurred only.

hp-check -t
Saving output in log file: /root/hp-check.log

HP Linux Imaging and Printing System (ver. 3.19.12)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile
HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to
successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
    OK
    MISSING - Missing Dependency or Permission or Plug-in
    INCOMPAT - Incompatible dependency-version or Plugin-version

warning: 3-15.2 version is not supported. Using 3-15.1 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.3.18-lp152.41-default #1 SMP Thu Sep 3 23:02:59 UTC 2020 (a4d139b) GNU/Linux
 Host: linux-zd3t
 Proc: 5.3.18-lp152.41-default #1 SMP Thu Sep 3 23:02:59 UTC 2020 (a4d139b) GNU/Linux
 Distribution: 3 15.2
 Bitness: 64 bit

-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.19.12
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 3 distro 15.2 version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.19.12

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/cups/model/manufacturer-PPDs/hplip
ppdbase=/usr/share/cups/model/manufacturer-PPDs
doc=/usr/share/doc/packages/hplip
html=/usr/share/doc/packages/hplip
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/lib/cups/driver
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=no
cups-ppd-install=yes
internal-tag=3.19.12
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no

Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
installed = 1
eula = 1
version = 3.19.12

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan=/usr/bin/xsane -V %SANE_URI%

[fax]
email_address=
voice_phone=

[last_used]
device_uri=
printer_name=HP_LaserJet_Professional_M1212nf_MFP
working_dir=.

[polling]
device_list=
enable=false
interval=5

[refresh]
enable=false
rate=30
type=1

[settings]
systray_messages=0
systray_visible=0

[upgrade]
last_upgraded_time=1580929525
notify_upgrade=false
pending_upgrade_time=0

 <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>

-------------------------
| External Dependencies |
-------------------------

 cups CUPS - Common Unix Printing System REQUIRED 1.1 2.2.7 OK 'CUPS Scheduler is running'
 gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.52 OK -
 xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
 scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.27 OK -
 dbus DBus - Message bus system REQUIRED - 1.12.2 OK -
 policykit PolicyKit - Administrative policy framework OPTIONAL - 0.116 OK -
 network network -wget OPTIONAL - 1.20.3 OK -
 avahi-utils avahi-utils OPTIONAL - 0.7 OK -

------------------------
| General Dependencies |
------------------------

 libjpeg libjpeg - JPEG library REQUIRED - - OK -
 cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.2.7 OK -
 cups-image CUPS image - CUPS image development files REQUIRED - 2.2.7 OK -
 libpthread libpthread - POSIX threads library REQUIRED - b'2.26' OK -
 libusb libusb - USB library REQUIRED - 1.0 OK -
 sane SANE - Scanning library REQUIRED - 1.0.27 OK -
 sane-devel SANE - Scanning library development files REQUIRED - 1.0.27 OK -
 libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.7.3 OK -
 libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.1 OK -
 python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.6.10 OK -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - MISSING 'python3-notify2 needs to be installed'
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 862, in <module>
    num_errors, num_warns = dep.validate(time_flag, is_quiet_mode)
  File "/usr/bin/hp-check", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/bin/hp-check", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 303, in get_pyQt4_version
    from PyQt4 import QtCore
ImportError: cannot import name 'QtCore'

--------------------------------------------------------------------

I run as normal user hp-plugin, which succeeded:

Done.
 Plug-in installation successful

Then I run hp-setup as root, it finds my printer on the network but then tells me that I need to install a plug-in. It offered to download it again, no option to tell the system that I have installed it already. That's why I choose d to download and install the plugin again. It tells me that the plug-in installation failed.

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.

In essence I am stuck in a loop here, hp-setup tells me plugin is missing, plug-in installation tells me all fine. hplib.state file shows plug-in as installed (=1 correct?). So where does hp-setup try to look if the plug-in is installed or not?

Any idea what to do next?

Thanks!

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
shivani mandora (shivani1708) said :
#1

Hi ,

Can you please try to install plugin using "sh" command instead of "Hp-plugin" :

$sh hplip-3.19.12-plugin.run

Please let me know if you face any issue.

And also , Suse 15.2 will be supported in our next release 3.20.9

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#2

Hi,

where do find this hplip-3.19.12-plugin.run? I am not able to find it on my PC. So I downloaded that file from your archive (exactly the version I use). When I try to run it I get

~/Downloads> ./hplip-3.19.12-plugin.run
Verifying archive integrity... All good.
Uncompressing HPLIP 3.19.12 Plugin Self Extracting Archive..............................................................
Error importing HPLIP modules. Is HPLIP installed?

HPLIP is installed, it is installed from the openSuse repository, so assuming that I have a correct installation.

Other question, when do you expect 3.20.9 to be released?

Thanks!

Revision history for this message
shivani mandora (shivani1708) said :
#3

Hi ,

Plugin is showing this error because run file is not installed properly.

We will release 3.20.9 on september end only. You can install that file also.

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#4

okay I got now 3.20.9 from your download page. I have run the run file and it installs the plug-in without reporting an error. Nevertheless once the GUI printer install comes up, it detects the printer, but then I get this error and I am not able to continue

un "hp-plugin" to installa plugin libraries if you are not automatically prompted

Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1307, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 731, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1102, in readwriteFaxInformation
    d = fax.getFaxDevice(self.fax_uri, disable_dbus=True)
  File "/usr/share/hplip/fax/fax.py", line 534, in getFaxDevice
    return MarvellFaxDevice(device_uri, printer_name, callback, fax_type, disable_dbus)
  File "/usr/share/hplip/fax/marvellfax.py", line 109, in __init__
    self.service.SendEvent(device_uri, printer_name, EVENT_FAX_FAILED_MISSING_PLUGIN, os.getenv('USER'), job_id, "Plugin is not installed")
AttributeError: 'NoneType' object has no attribute 'SendEvent'
error: Loading /usr/share/hplip/fax/plugins/fax_marvell.so failed. Try after installing plugin libraries

Run "hp-plugin" to installa plugin libraries if you are not automatically prompted

Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1307, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 731, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1102, in readwriteFaxInformation
    d = fax.getFaxDevice(self.fax_uri, disable_dbus=True)
  File "/usr/share/hplip/fax/fax.py", line 534, in getFaxDevice
    return MarvellFaxDevice(device_uri, printer_name, callback, fax_type, disable_dbus)
  File "/usr/share/hplip/fax/marvellfax.py", line 109, in __init__
    self.service.SendEvent(device_uri, printer_name, EVENT_FAX_FAILED_MISSING_PLUGIN, os.getenv('USER'), job_id, "Plugin is not installed")
AttributeError: 'NoneType' object has no attribute 'SendEvent'

Done.

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#5

Anyone an idea on this?

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#6

Found a solution which works for me. I modified

/usr/share/hplip/fax/marvellfax.py:

            if pluginObj.getStatus() != pluginhandler.PLUGIN_INSTALLED:
                log.error("Loading %s failed. Try after installing plugin libraries\n" %lib_name);
                log.info("Run \"hp-plugin\" to installa plugin libraries if you are not automatically prompted\n")
                job_id =0;
                self.service.SendEvent(device_uri, printer_name, EVENT_FAX_FAILED_MISSING_PLUGIN, os.getenv('USER'), job_id, "Plugin is not installed")
                sys.exit(1)
            else:
                self.libfax_marvell = cdll.LoadLibrary(lib_name)

I removed that if-else statement and had the self.libfax_marvell = cdll.LoadLibrary(lib_name) executed in any case. Then everything went through. I don't need fax features so I cannot say if fax might be working or might not be working.

For further analysis I wanted to write a little test python script running

            from installer import pluginhandler
            pluginObj = pluginhandler.PluginHandle()

            if pluginObj.getStatus() != pluginhandler.PLUGIN_INSTALLED:

to see what these methods return in my case. Unfortnately I am getting "No module named installer". If you can give me a hint where I get this module (I assume I have it somewhere on my harddrive just need the correct import statement). Maybe my debugging will help to improve the installer and thus help other users. Let me know if you want me to do some tests on my end.

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#7

Found the modules, so I was able to do some more debugging. The issue lies in pluginhandler.py

    def __getPluginFilesList(self, src_dir):

There you read src, trg and link of models based on the plugin.spec file in /usr/share/hplip. On the latest hplip there are all kind of entries like

/usr/lib/i386-linux-gnu/sane/libsane-hp2000S1.so and
/usr/lib/x86_64-linux-gnu/libjpeg.so.9

The problems are the directories i386-linux-gnu and x86_64-linux-gnu, neither exists on openSuse and thus the installer claims that my plugin installation is corrupted (status -2 in my test script). I have checked on a system running 3.18.6, there the plugin.spec file does NOT have these entries. The first of the two examples above is for example located in /usr/lib/sane. Of course I don't know how other distros have their directory structure, but in openSuse 15.1 and 15.2 the structure is without i386... and x64... in the path.

I would say that either the spec file is buggy, or if you need that structure for other distros then the python script needs to adjust the paths for openSuse somehow.

I hope that helps to fix that bug. From my point of view I would say that this new version won't work for any openSuse user. If there is more I can provide then please let me know.

Revision history for this message
Launchpad Janitor (janitor) said :
#8

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

Revision history for this message
Willi Wichtig (karl-heinz-1950) said :
#9
Revision history for this message
Launchpad Janitor (janitor) said :
#10

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