3.18.3 of hplip error

Bug #1756741 reported by Manolo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
In Progress
Undecided
Afshan F

Bug Description

I got troubles when trying to use the scanner.
This is what I got:

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

hp-setup
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 48, in <module>
    from base import device, utils, tui, models, module, services, os_utils
  File "/usr/share/hplip/base/device.py", line 42, in <module>
    from . import status
  File "/usr/share/hplip/base/status.py", line 33, in <module>
    import cupsext
ImportError: libusb-1.0.so.0: failed to map segment from shared object

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

This is the hp-check output.

hp-check
Saving output in log file: /home/manolo/Scrivania/hp-check.log

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

Copyright (c) 2001-15 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

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

 Kernel: 4.13.0-37-generic #42-Ubuntu SMP Wed Mar 7 14:13:23 UTC 2018 GNU/Linux
 Host: manolo-Aspire-5735
 Proc: 4.13.0-37-generic #42-Ubuntu SMP Wed Mar 7 14:13:23 UTC 2018 GNU/Linux
 Distribution: 12 17.10
 Bitness: 64 bit

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

HPLIP-Version: HPLIP 3.18.3
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for ubuntu distro 17.10 version

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

[hplip]
version=3.18.3

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.18.3
html=/usr/share/doc/hplip-3.18.3
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
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=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.18.3
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
qt5=no
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=yes
class-driver=no

Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: File o directory non esistente

Current contents of '~/.hplip/hplip.conf' file:
[upgrade]
notify_upgrade = true
last_upgraded_time = 1521407488
pending_upgrade_time = 0
latest_available_version = 3.17.10

[installation]
date_time = 18/03/2018 22:22:24
version = 3.18.3

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

--------------
| COMPILEDEP |
--------------

 gcc gcc - GNU Project C and C++ Compiler REQUIRED - 7.2.0 OK -
 make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.1 OK -
 libtool libtool - Library building support services REQUIRED - 2.4.6 OK -

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

 libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.0.2 OK -
 python-xml Python XML libraries REQUIRED - 2.2.3 OK -
 libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.7.3 OK -
 sane-devel SANE - Scanning library development files REQUIRED - - OK -
 pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 1.1.7 OK -
 pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 REQUIRED 4.0 4.11.4 OK -
 libpthread libpthread - POSIX threads library REQUIRED - 2.26 OK -
 python-devel Python devel - Python development files REQUIRED 2.2 2.7.14 OK -
 cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.2.4 OK -
 python-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.4 OK -
 cups-ddk CUPS DDK - CUPS driver development kit OPTIONAL - - OK -
 reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.4.0 OK -
 pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 4.11.4 OK -
 libusb libusb - USB library REQUIRED - 1.0 OK -
 cups-image CUPS image - CUPS image development files REQUIRED - 2.2.4 OK -
 python2X Python 2.2 or greater - Python programming language REQUIRED 2.2 2.7.14 OK -
 python-notify Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
 libjpeg libjpeg - JPEG library REQUIRED - - OK -
 sane SANE - Scanning library REQUIRED - - OK -

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

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

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

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

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

 hpmudext IO-Extension REQUIRED - 3.18.3 OK -
 cupsext CUPS-Extension REQUIRED - 3.18.3 OK -

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

No Scanner found.

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

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

No errors or warnings.

Done.

Revision history for this message
Afshan F (afshan) wrote :

Hi Manolo,

How are you connecting the printer? Through USB or LAN? If you are connecting through USB. Can you type lsusb in the terminal and check whether the Printer is connected with the series as given below?

Bus 001 Device 006: ID 03f0:1xxx Hewlett-Packard

And also try downloading libusb package on Ubuntu.

Please let me know if you are still facing any issues.

Thanks,
Afshan

Changed in hplip:
assignee: nobody → Afshan F (afshan)
status: New → In Progress
Revision history for this message
Manolo (favetella) wrote :

Dear Afshan,
Thanks for your reply.

I experience the problem when connecting my Kubuntu 17.10 machine with the device via wifi. The wifi settings on the device and on the wifi-modem are ok since another Linux machine (Ubuntu 16.04) perfectly prints and scans via wifi.

Should I make ant other test?
What about helping me cleaning all the previous installations (checking manually to have completely removed both the previous manual installation (downloaded the installer from the official website) and the installation through the repositories? In fact, I've been reading somewhere that probably the latest versions of hplip installer do realize about the presence of previous installations but sometime may fail removing them.

Thanks for your support,
Best regards.

Revision history for this message
brian_p (claremont102) wrote :

> I experience the problem when connecting my Kubuntu 17.10 machine
> with the device via wifi. The wifi settings on the device and on
> the wifi-modem are ok since another Linux machine (Ubuntu 16.04)
> perfectly prints and scans via wifi.

I'd advise that you get the device working first over a USB link. How do you go on with that?

> What about helping me cleaning all the previous installations.....

This is not supported on Debian (bug #839400); I do not know what the situation is on Ubuntu. Purge any Ubuntu hplip package installations and delete /usr/share/hplip and /var/lib/hp. Is there any reason why you need 3.18.3 rather than the distribution's packages?

BTW, you didn't say what device you are using.

Cheers,

Brian.

Revision history for this message
Manolo (favetella) wrote :

Dear Brian,

Thanks for your reply.

Actually it's been working fine with no need to install the device via USB. In fact, it's given the possibility to do everything via wifi and if it's not working then we have a problem, no?

Also, it seem that the kind of issue is not related to having the device connected via USB or wifi while installing, but to something else.

However, after removing all the previous installations I'll install the distribution packages via USB as you're suggesting. Let's see what happens.

By the way, so sorry for not mentioning before that the device is HP Laser Jet Pro MFP M277dw.

Thanks,
Regards.

Revision history for this message
brian_p (claremont102) wrote :

Hello Manolo,

In your hp-check output you have:

> Current contents of '/var/lib/hp/hplip.state' file:
> Plugins are not installed. Could not access file: File
> o directory non esistente

The M277dw requires a plugin for scanning.

Cheers,

Brian.

Revision history for this message
Manolo (favetella) wrote :

Hi Brian,

Thanks for your support.

In fact, this was the original problem. I had installed the HPLIP before but the scanned was not working due to missing plugin.

Since I've not been able to install the plugin, I tried to install the HPLIP from scratch end that was what I got.

Any suggestion, please?
Thanks,
Regards.

Revision history for this message
brian_p (claremont102) wrote :

Hello Manolo,

Follow the previous advice on removing HPLIP from your system. If there is anything hplip related in /etc/ or $HOME after that, also remove it. Install Ubuntu's hplip and run 'hp-setup -i'. The first thing this command should do is install the plugin.

Cheers,

Brian.

Revision history for this message
Manolo (favetella) wrote :

Hi Brian,

that's what's left on my system after a first cleaning.

sudo find / -iname hp
[sudo] password di manolo:
/usr/share/cups/drv/hp
/usr/share/X11/xkb/geometry/hp
/usr/share/X11/xkb/keycodes/hp
/usr/share/ppd/HP
/usr/lib/cups/backend/hp
/usr/src/linux-headers-4.13.0-37-generic/include/config/scsi/dh/hp
/usr/src/linux-headers-4.13.0-37-generic/include/config/hp
/usr/src/linux-headers-4.13.0-36-generic/include/config/scsi/dh/hp
/usr/src/linux-headers-4.13.0-36-generic/include/config/hp
/usr/src/linux-headers-4.13.0-36/arch/ia64/hp
/usr/src/linux-headers-4.13.0-36/drivers/net/ethernet/hp
/usr/src/linux-headers-4.13.0-37/arch/ia64/hp
/usr/src/linux-headers-4.13.0-37/drivers/net/ethernet/hp
/lib/modules/4.13.0-36-generic/kernel/drivers/net/ethernet/hp
/lib/modules/4.13.0-37-generic/kernel/drivers/net/ethernet/hp
/lib/firmware/hp
/home/manolo/.local/share/Trash/files/hplip-3.18.3/.libs/hp
/home/manolo/.local/share/Trash/files/hplip-3.18.3/hp
/home/manolo/Documenti/Acquisti/2 StampanteHP-M277DW/hplip-3.17.7/.libs/hp
/home/manolo/Documenti/Acquisti/2 StampanteHP-M277DW/hplip-3.17.7/hp

Should I remove something else?
Then can I try installing the hplip software and printer/scanner related plugins with the device connected via wifi?

Thanks,
Regards.

Revision history for this message
brian_p (claremont102) wrote :

Hello Manolo,

The only file files I can identify as belonging to hplip are:

> /usr/share/cups/drv/hp
> /usr/lib/cups/backend/hp

You could delete them but they should be overwritten with a new install of hplip.

I'd advise using your distribution's package manager to install, but it is up to you.

Cheers,

Brian.

Revision history for this message
Manolo (favetella) wrote :

ok, done.

Should I remove this too? /usr/share/ppd/HP

And what about trying to install hplip and related stuff having the device connected via Wifi?

Thanks,
Regards.

Revision history for this message
brian_p (claremont102) wrote :

/usr/share/ppd/HP isn't used by my Debian (and, I suspect, your Ubuntu) hplip. Move it out of the way if you are bothered.

WiFi shouldn't be a problem. (I did suggest a USB install first, but you didn't seem keen on that).

Cheers,

Brian.

Revision history for this message
dermaze (chox16) wrote :

Hello,

I had the same problem with hplip-3.17.10 on Ubuntu 14.04. hp-setup threw the ImportError with libusb.

I did not geht the outcome of hp-check before fixing it, but your entry
"Current contents of '/etc/hp/hplip.conf' file:
...
libusb01-build = no
..."
points to the same cause: The flag "--disable-libusb01_build" is set in the .configure call.

My solution was to repeat the configure/make/make install steps manually, with that flag set to "enable", like that:
"Ich@Mein-Computer:~/Downloads/hplip-3.17.10$ ./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib --prefix=/usr --enable-qt4 --disable-qt5 --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --enable-libusb01_build --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build --enable-apparmor_build
make
make clean
sudo make install
hp-setup"

The .configure call was copied from the terminal output of hplip-3.17.10.run.

Now printing and scanning over network works again after hp-setup downloaded and installed the necessary plugin as intended.

This is, however, only a workaround. I did not uncover the cause for the "--disable-libusb01_build" flag. Also I did not test it with 3.18.3 directly.

Above content has also been posted here: https://ubuntuforums.org/showthread.php?t=2387244&p=13755836#post13755836

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.