hplip python error [SOLVED]

hplip python error [SOLVED]

Postby rmag » Jan 31st, '16, 17:25

I recently installed Mageia-5 and it is working very well. However, I am not able to run hp-setup command, although hplip package installed without any problem. I get following error:

Code: Select all
root@localhost:/home/abcde# hp-setup -i
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 45, in <module>
    from base import device, utils, tui, models, module, services, os_utils
  File "/usr/share/hplip/base/device.py", line 43, in <module>
    import status
  File "/usr/share/hplip/base/status.py", line 59, in <module>
    import hpmudext
ImportError: /usr/lib/python2.7/site-packages/hpmudext.so: undefined symbol: hpmud_mdns_lookup
root@localhost:/home/abcde#

I tried to search it on google and found http://www.linuxquestions.org/questions ... or-882033/ and http://www.linuxquestions.org/questions ... 175492890/ amongst other pages, but could not solve it. How can I correct this problem? Thanks for your help.
Last edited by rmag on Feb 1st, '16, 17:31, edited 1 time in total.
rmag
 
Posts: 32
Joined: Jan 31st, '16, 14:58

Re: hplip python error

Postby doktor5000 » Jan 31st, '16, 18:39

Hi,

can you please post the output of
Code: Select all
urpmq --list-media active --list-url
rpm -qa|sort|grep -E "hplip|^python"
hp-check -r
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: hplip python error

Postby rmag » Jan 31st, '16, 19:54

Following is the output:
Code: Select all
root@localhost:/home/abcde# urpmq --list-media active --list-url
Live Core /var/local/mga_rpms/core
Live Nonfree /var/local/mga_rpms/nonfree
Core Release http://mirrors.tuna.tsinghua.edu.cn/mageia/distrib/5/i586/media/core/release
Core Updates http://mirrors.tuna.tsinghua.edu.cn/mageia/distrib/5/i586/media/core/updates
Nonfree Release http://mirrors.tuna.tsinghua.edu.cn/mageia/distrib/5/i586/media/nonfree/release
Nonfree Updates http://mirrors.tuna.tsinghua.edu.cn/mageia/distrib/5/i586/media/nonfree/updates
root@localhost:/home/abcde#
root@localhost:/home/abcde#
root@localhost:/home/abcde# rpm -qa|sort|grep -E "hplip|^python"
hplip-3.14.6-8.1.mga5
hplip-hpijs-3.15.11-1.mga5
hplip-hpijs-ppds-3.15.11-1.mga5
hplip-model-data-3.15.11-1.mga5
python-2.7.9-2.mga5
python3-3.4.3-1.1.mga5
python3-pip-6.1.1-2.mga5
python3-pkg-resources-3.6-7.mga5
python3-pycrypto-2.6.1-6.mga5
python3-setuptools-3.6-7.mga5
python-cairo-1.10.0-12.mga5
python-cffi-1.1.2-1.mga5
python-cryptography-1.0.2-1.mga5
python-dbus-1.2.0-12.mga5
python-decorator-3.4.0-9.mga5
python-enum34-1.0.4-1.mga5
python-farstream-0.1.2-9.mga5
python-gi-3.14.0-2.mga5
python-gi-cairo-3.14.0-2.mga5
python-gobject-2.28.6-17.mga5
python-idna-2.0-1.mga5
python-ipaddress-1.0.15-1.mga5
python-javapackages-4.1.0-15.mga5
python-kde4-4.14.3-1.mga5
python-libproxy-0.4.11-10.mga5
python-lxml-3.3.6-4.mga5
python-notify-0.1.1-15.mga5
python-numpy-1.8.2-4.mga5
python-OpenSSL-0.14-1.mga5
python-papyon-0.5.6-9.mga5
python-pillow-2.6.2-2.3.mga5
python-pkg-resources-3.6-7.mga5
python-ply-3.4-9.mga5
python-pyasn1-0.1.8-1.mga5
python-pycparser-2.10-7.mga5
python-pycrypto-2.6.1-6.mga5
python-pyxb-1.2.3-4.mga5
python-pyxdg-0.25-8.mga5
python-qt4-4.11.3-1.mga5
python-qt4-core-4.11.3-1.mga5
python-qt4-dbus-4.11.3-1.mga5
python-qt4-declarative-4.11.3-1.mga5
python-qt4-designer-4.11.3-1.mga5
python-qt4-gui-4.11.3-1.mga5
python-qt4-multimedia-4.11.3-1.mga5
python-qt4-network-4.11.3-1.mga5
python-qt4-opengl-4.11.3-1.mga5
python-qt4-script-4.11.3-1.mga5
python-qt4-sql-4.11.3-1.mga5
python-qt4-svg-4.11.3-1.mga5
python-qt4-test-4.11.3-1.mga5
python-qt4-webkit-4.11.3-1.mga5
python-qt4-xml-4.11.3-1.mga5
python-qt4-xmlpatterns-4.11.3-1.mga5
python-reportlab-3.1.8-5.mga5
python-rpm-4.12.0.1-20.4.mga5
python-selinux-2.3-4.mga5
python-setuptools-3.6-7.mga5
python-simplejson-3.6.3-4.mga5
python-sip-4.16.9-1.mga5
python-six-1.7.3-4.mga5
python-slip-0.4.0-7.mga5
python-slip-dbus-0.4.0-7.mga5
python-telepathy-0.15.19-7.mga5
python-webkitgtk-1.1.8-9.mga5
root@localhost:/home/abcde#
root@localhost:/home/abcde# hp-check -r
bash: hp-check: command not found
root@localhost:/home/abcde#
rmag
 
Posts: 32
Joined: Jan 31st, '16, 14:58

Re: hplip python error

Postby doktor5000 » Jan 31st, '16, 21:59

rmag wrote:root@localhost:/home/abcde# hp-check -r
bash: hp-check: command not found


You seem to be missing the hplip-gui package. Can you please install that and try again with hp-check -r please?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: hplip python error

Postby rmag » Feb 1st, '16, 03:05

I installed hp-gui and now following is the output:

Code: Select all
# hp-check -r
Saving output in log file: /home/cardio/hp-check.log

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

Copyright (c) 2001-13 Hewlett-Packard 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: mageia distro is not found in AUTH_TYPES
warning: unknown-0.0 version is not supported. Using unknown-0 versions dependencies to verify and install...

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

 Kernel: 4.1.15-desktop586-2.mga5 #1 SMP Wed Jan 20 17:06:34 UTC 2016 GNU/Linux
 Host: localhost.localdomain
 Proc: 4.1.15-desktop586-2.mga5 #1 SMP Wed Jan 20 17:06:34 UTC 2016 GNU/Linux
 Distribution: unknown 0.0
 Bitness: 32 bit


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

HPLIP-Version: HPLIP 3.14.6
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for unknown distro  0.0 version

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

[hplip]
version=3.14.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.14.6
html=/usr/share/doc/hplip-3.14.6
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=yes
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=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=yes
internal-tag=3.14.6
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no


Current contents of '/var/lib/hp/hplip.state' file:


Current contents of '~/.hplip/hplip.conf' file:
warning: Could not access file: No such file or directory
 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

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

 policykit            Admin-Policy-framework    OPTIONAL        -               0.113           OK         -
 gs                   Ghostscript               REQUIRED        7.05            9.14            OK         -
 network              Network-wget              OPTIONAL        -               1.15            OK         -
 scanimage            Shell-Scanning            OPTIONAL        1.0             1.0.24          OK         -
 avahi-utils          avahi-utils               OPTIONAL        -               0.6.31          OK         -
 error: dbus          DBus                      REQUIRED        -               1.8.20          MISSING    'DBUS may not be installed or not running'
 error: cups          CUPS                      REQUIRED        1.1             -               INCOMPAT   'CUPS may not be installed or not running'
 xsane                SANE-GUI                  OPTIONAL        0.9             0.999           OK         -

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

 error: reportlab     Python-PDF-Lib            OPTIONAL        2.0             3.1.8           MISSING    'reportlab needs to be installed'
 error: libcrypto     OpenSSL-Crypto-Lib        REQUIRED        -               1.0.2           MISSING    'libcrypto needs to be installed'
 pil                  Python-Image-Lib          OPTIONAL        -               1.1.7           OK         -
 pyqt4-dbus           PyQt4-DBUS                REQUIRED        4.0             4.11.3          OK         -
 error: libjpeg       JPEG-Lib                  REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: libpthread    POSIX-Threads-Lib         REQUIRED        -               2.20            MISSING    'libpthread needs to be installed'
 python-dbus          Python-DBUS               REQUIRED        0.80.0          1.2.0           OK         -
 error: python-devel  Python-SDK                REQUIRED        2.2             2.7.9           MISSING    'python-devel needs to be installed'
 pyqt4                Python-Qt4                REQUIRED        4.0             4.11.3          OK         -
 error: cups-devel    CUPS-SDK                  REQUIRED        -               -               MISSING    'cups-devel needs to be installed'
 error: sane-devel    SANE-SDK                  REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libusb        USB-Lib                   REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 Scan-Lib                  REQUIRED        -               -               OK         -
 error: cups-image    CUPS-Image-Lib            REQUIRED        -               -               MISSING    'cups-image needs to be installed'
 error: libnetsnmp-devel SNMP-Networking-SDK       REQUIRED        5.0.9           -               MISSING    'libnetsnmp-devel needs to be installed'
 python-xml           Python-XML-Lib            REQUIRED        -               2.1.0           OK         -
 python-notify        Desktop-notifications     OPTIONAL        -               -               OK         -

----------------------
|  Python Extentions |
----------------------

 cupsext              CUPS-Extension            REQUIRED        -               3.14.6          OK         -
 pcardext             PhotoCard-Extension       REQUIRED        -               3.14.6          OK         -
error: NOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of hpmudext.
 error: hpmudext      IO-Extension              REQUIRED        -               3.14.6          MISSING    'Not Found or Failed to load, Please reinstall HPLIP'

-----------------------
|  Scan Configuration |
-----------------------

 hpaio                HPLIP-SANE-Backend        REQUIRED        -               3.14.6          OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension       REQUIRED        -               3.14.6          OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

No Scanner found.

--------------
| PERMISSION |
--------------

 
-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
None

Missing Optional Dependencies
-----------------------------
None


Total Errors: 13
Total Warnings: 1


Done.


I also reinstalled hplip but the error persists:
Code: Select all
# urpmi --replacepkgs hplip

    $MIRRORLIST: media/core/updates/hplip-3.14.6-8.1.mga5.i586.rpm
installing hplip-3.14.6-8.1.mga5.i586.rpm from /var/cache/urpmi/rpms                                                                       
Preparing...                     #########################################################################################################
      1/1: hplip                 #########################################################################################################


# hp-setup -i
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 45, in <module>
    from base import device, utils, tui, models, module, services, os_utils
  File "/usr/share/hplip/base/device.py", line 43, in <module>
    import status
  File "/usr/share/hplip/base/status.py", line 59, in <module>
    import hpmudext
ImportError: /usr/lib/python2.7/site-packages/hpmudext.so: undefined symbol: hpmud_mdns_lookup
#
rmag
 
Posts: 32
Joined: Jan 31st, '16, 14:58

Re: hplip python error

Postby doktor5000 » Feb 1st, '16, 14:46

Hmmm I forgot that there are two library subpackages which are not named hplip-anything, but those contain the library with the undefined symbol
rmag wrote:ImportError: /usr/lib/python2.7/site-packages/hpmudext.so: undefined symbol: hpmud_mdns_lookup


Just checked in which file/library that undefined symbol is contained:
Code: Select all
[doktor5000@Mageia5]─[13:38:58]─[~] symbol=hpmud_mdns_lookup
[doktor5000@Mageia5]─[13:39:30]─[~] for f in /usr/lib64/*.so.*; do objdump -t -T $f | grep $symbol | grep -v '*UND*' && echo $f; done
000000357820b070 g    DF .text  0000000000000680  Base        hpmud_mdns_lookup
/usr/lib64/libhpmud.so.0
000000357820b070 g    DF .text  0000000000000680  Base        hpmud_mdns_lookup
/usr/lib64/libhpmud.so.0.0.6


So please try to reinstall those two libraries via
Code: Select all
urpmi --replacepkgs --replacefiles $(rpm -E "%mklibname hpip 0") $(rpm -E "%mklibname sane-hpaio 1")

and then please also show the output of
Code: Select all
rpm -qa|sort| grep -E "lib.*hpip|sane-hpaio"
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: hplip python error

Postby rmag » Feb 1st, '16, 16:21

The command did not work:
Code: Select all
# urpmi --replacepkgs --replacefiles $(rpm -E "%mklibname hpip 0") $(rpm -E "%mklibname sane-hpaio 1")
No package named %mklibname
No package named hpip
No package named 0
No package named %mklibname
No package named sane-hpaio
No package named 1

Other command (without above command working):
Code: Select all
# rpm -qa|sort| grep -E "lib.*hpip|sane-hpaio"
libhpip0-3.15.11-1.mga5
libsane-hpaio1-3.15.11-1.mga5

I try to reinstall these packages but they are not available:
Code: Select all
root@localhost:/home/abcde/bin# urpmi --replacepkgs --replacefiles libhpip0-3.15.11-1.mga5
No package named libhpip0-3.15.11-1.mga5

root@localhost:/home/abcde/bin# urpmi --replacepkgs --replacefiles libsane-hpaio1-3.15.11-1.mga5
No package named libsane-hpaio1-3.15.11-1.mga5

Older versions are available in media:
Code: Select all
# urpmq -f libhpip0
libhpip0-3.14.6-8.mga5.i586|libhpip0-3.14.6-8.1.mga5.i586

# urpmq -f libsane-hpaio1
libsane-hpaio1-3.14.6-8.mga5.i586|libsane-hpaio1-3.14.6-8.1.mga5.i586

Should I remove installed versions and install these ones?
rmag
 
Posts: 32
Joined: Jan 31st, '16, 14:58

Re: hplip python error

Postby doktor5000 » Feb 1st, '16, 16:48

rmag wrote:The command did not work:
Code: Select all
# urpmi --replacepkgs --replacefiles $(rpm -E "%mklibname hpip 0") $(rpm -E "%mklibname sane-hpaio 1")
No package named %mklibname
No package named hpip
No package named 0
No package named %mklibname
No package named sane-hpaio
No package named 1

That's interesting. Can you post the output from
Code: Select all
rpm -E "%mklibname hpip 0"


rmag wrote:Other command (without above command working):
Code: Select all
# rpm -qa|sort| grep -E "lib.*hpip|sane-hpaio"
libhpip0-3.15.11-1.mga5
libsane-hpaio1-3.15.11-1.mga5

Should I remove installed versions and install these ones?


Exactly, uninstall those two and reinstall hplip and hplip-gui, it should pull all necessary dependencies.
The two libraries are from backports for a newer hplip version, not sure how you got them. That's why I've asked initially about which repos you have enabled currently - maybe you had them enabled in the past.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: hplip python error

Postby rmag » Feb 1st, '16, 17:25

The command output:
Code: Select all
# rpm -E "%mklibname hpip 0"
%mklibname hpip 0

I removed libhpip0-3.15.11-1.mga5 (which also removed libsane-hpaio1-3.15.11-1.mga5) packages and reinstalled hplip and hplip-gui and now the command "hp-setup -i" works. Thanks for your help.
rmag
 
Posts: 32
Joined: Jan 31st, '16, 14:58


Return to Printers and Scanners

Who is online

Users browsing this forum: No registered users and 1 guest

cron