Ubuntu 11.10 HPLiP drivers not working for Color Laserjet CM2320nf printer

Bug #877793 reported by Rickard
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
goutam kodu
eglibc (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Drivers used to install for Ubuntu 11.04 from hplip-3.11.3 upwards. But it seems broken for hplip-3.11.10 and Ubuntu 11.10.
I realise support was only put in 11.10 Beta 2 in hplip-3.11.10. If a new version for 11.10 or statement update one when it is expected that would be great.

1. Your Linux Distribution and version.
Linux 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

2. Your printer make/model.
Color Laserjet CM2320nf

3. If possible, run 'hp-check -t' and post the output.
Included in attachment

4. A detailed explanation of your problem.
Using automatic install I cannot install the hplip-3.11.10 drivers in Ubuntu 11.10

5. Steps to recreate the problem.
Just perform automatic install on Ubuntu 11.10

I have included an attachment of the output of the commands run and also my hardware spec.

Tags: multiarch
Revision history for this message
Rickard (rickard-uk) wrote :
Revision history for this message
goutam kodu (goutam-hplip) wrote :

Hi Richard,

Thank you for the terminal output.
The problem with Ubuntu 11.10 x86_64 bit is that they dont have a softlink between /usr/lib64 to /usr/lib. Where as in previous versions of Ubuntu (10.10 & 11.04) x86_64 bit there was a softlink between them.
HPLIP installer copies the libhpmud.* file in the /usr/lib64 directory and when "import hpmudext " is called from the status.py file it tries to look for the library in /usr/lib/ directory by default and hence it reports ,
ImportError: libhpmud.so.0: cannot open shared object file: No such file or directory

/usr/lib64 path is not set in LD_LIBRARY_PATH (env variable) by default hence is ends up looking for the library in /usr/lib/ (Which is something OS has to take care)

You can launch a query about this to Ubuntu.
What is i can provide is only a work around.

Open terminal and type in the below command:
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/"

Next run the command : "hp-setup" and check if it imports the library libhpmud.so.0

This is a temporary solution . The environment variable LD_LIBRARY_PATH is set until the terminal in not closed. To have this variable permanently set you need to edit the file .bashrc present in your home folder ($HOME).
Go to you home directory ( $cd ~)
edit the file .bashrc ( $vim .bashrc)
enter the below lines at the end of the file and save it and close it

LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/lib64/
export LD_LIBRARY_PATH

After that restart your system and check running "hp-setup"
Let us know on the same,

Thanks,
Kodu

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
That has moved on the bug. Now the HP Device Manager starts from the console like so:

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
$ hp-setup

HP Linux Imaging and Printing System (ver. 3.11.10)
Printer/Fax Setup Utility ver. 9.0

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

(python:2739): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(python:2739): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(python:2739): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(python:2739): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=mdns)
error: The printer you are trying to setup requires a binary driver plug-in and it failed to install. Please check your internet connection and try again. Visit http://hplipopensource.com for more infomation.

And I can see the printer on the Ethernet LAN network so, it finds it but when I select it there is an error as it cannot find the binary driver plug-in. The Internet connection I have works fine so, I do not think it's that. I have included a capture of the dialog error message for you.

Revision history for this message
goutam kodu (goutam-hplip) wrote :

HI Richard,

Due to some technical issues the hplipopensource.com site was down for few hours. Its up now and running fine. Can you please try resetting your printer again.

Sorry for the inconvenience caused.

Thanks & Regards,
Kodu

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
Still not working, the HP Device Manager performs the Device Discovery and I can see my printer across the network. but I still get the same error when I select it and hit Next>

I can see the Internet as this is type from the same machine.

:(

Revision history for this message
goutam kodu (goutam-hplip) wrote :

Hi,

Can you run "hp-check -t" command in terminal and get its output.
And also post me the terminal debug out put of "hp-setup -g" command.
To install plugin files try command "sudo hp-plugin -g" and post me its terminal output.

Thanks,
Goutam Kodu

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
Looks like a missing link again:

$ sudo hp-plugin -g
Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 39, in <module>
    from base import device, utils, tui, module
  File "/usr/share/hplip/base/device.py", line 39, in <module>
    import status
  File "/usr/share/hplip/base/status.py", line 45, in <module>
    import hpmudext
ImportError: libhpmud.so.0: cannot open shared object file: No such file or directory

I have attached a tar ball of the terminal output for all options anyway.

Revision history for this message
goutam kodu (goutam-hplip) wrote :

Hi,

The environment variable LD_LIBRARY_PATH is set until the terminal in not closed. To have this variable permanently set you need to edit the file .bashrc present in your home folder ($HOME).
Go to you home directory ( $cd ~)
edit the file .bashrc ( $vim .bashrc)
enter the below lines at the end of the file and save it and close it

LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/lib64/
export LD_LIBRARY_PATH

After that restart your system and check running command "hp-plugin -g"
Let us know on the same,

Thanks,
Goutam Kodu

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
Okay I have added that to .bashrc and restarted. I then have a capture output for you proving I am in home dir and echo'ing out the LD_LIBRARY_PATH variable.

But I get the same error again. I have included in another attachment tar ball the capture and my .bashrc file.
So, still not working :(

Revision history for this message
goutam kodu (goutam-hplip) wrote :

Hi Richard,

When it comes to installing of the plugin files for your printer it will ask you to have sudo user previlages. By default the env variable LD_LIBRARY_PATH is not set for sudo user.
Will provide you the steps to set the same for sudo user:

1. Enter the folder /etc/ld.so.conf.d/
    $ cd /etc/ld.so.conf.d/

2. create a "conf" file by name "lib64.conf".
    $vim lib64.conf

3. Add the line /usr/lib64/ in the file lib64.conf

4. Run command "sudo ldconfig" to load the libraries.

5. Next run commad "sudo hp-plugin -g" and check whether you are able to download and install the plugin file.

Sorry for inconvenience.

Thanks & Regards,
Goutam Kodu

Changed in hplip:
status: New → In Progress
assignee: nobody → goutamkk (goutam-hplip)
Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
This worked in installing the plugin :)
And then the printer was found and connected too with HP Device Manager. I printed a test page which also worked =]

However the drivers for the scanning do not work :(
I tested the scan option with HP Device Manager and got an error dialogue box, which I have included as an attached tar ball. I then ran:
hp-scan -g and got these results:

$ hp-scan -g

HP Linux Imaging and Printing System (ver. 3.11.10)
Scan Utility ver. 2.2

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

hp-scan[2493]: debug: getDeviceUri(None, None, ['hpaio'], {'scan-type': (<built-in function gt>, 0)}, , True)
hp-scan[2493]: debug: Mode=0
hp-scan[2493]: debug: hpfax:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4: back_end:hpfax is_hp:True bus:net model:HP_Color_LaserJet_CM2320nf_MFP serial: dev_file: host:NPI7887E4 zc:NPI7887E4 port:1
hp-scan[2493]: debug: hp:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4: back_end:hp is_hp:True bus:net model:HP_Color_LaserJet_CM2320nf_MFP serial: dev_file: host:NPI7887E4 zc:NPI7887E4 port:1
hp-scan[2493]: debug: Cache miss: hp_color_laserjet_cm2320nf_mfp
hp-scan[2493]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-scan[2493]: debug: Searching for section [hp_color_laserjet_cm2320nf_mfp] in file /usr/share/hplip/data/models/models.dat
hp-scan[2493]: debug: Found section [hp_color_laserjet_cm2320nf_mfp] in file /usr/share/hplip/data/models/models.dat
hp-scan[2493]: debug: {'hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4': ['Printer-HP_Color_LaserJet_CM2320nf_MFP']}
Using device: hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4

warning: No destinations specified. Adding 'file' destination by default.
error: Unable to locate device hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4 using SANE backend hpaio:. Please check HPLIP installation.

I also ran the same command on another machine that has 11.04 and it worked, I have included the capture for that 11.04 install in the attached tar ball. As you can see it can find 'hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4'.
Therefore the network and the printer are fine and it must be something to do with the installation of the drivers :(

So, a lot of great progress but now, only scanning fails :(

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
I have managed to run the command 'hp-probe' which finds the printer on the network.

However command: 'hp-scan -g'
Finds the printer as well but refuses to scan from it with the error line:
'error: Unable to locate device hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4 using SANE backend hpaio:. Please check HPLIP installation.'

In the file '/etc/sane.d/dll.d/hplip' hplip is entered ok and '/etc/sane.d/dll.conf' has the 'net' entry available and 'hpaio' at the end.

I have included the files and the command line captures in the attached tar ball. The printer is also showing up in CUPS so, I must assume that the network is not the issue. I think it is fair to say the installation is not completely working as I cannot scan but only print now :((((

Any updates from your side?

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi Rickard,

Can please run "scanimage -L" command and check whether device is detected or not.
if device is not detected, re-install sane package.

Also please send us syslog file.
$) tailf /var/log/syslog > /tmp/syslog.txt

run hp-scan from another terminal and attach "/tmp/syslog.txt" file here.

Thanks & Regards,
Amarnath

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
I think I have a crude non-standard work around.
I noticed on my 11.04 x64 installed that all the hapio files were in directory '/usr/lib/sane/' like so:
libsane-hpaio.la
libsane-hpaio.so
libsane-hpaio.so.1
libsane-hpaio.so.1.0.0

But not after driver install for 11.10 x64. They were after the install instead in the '/usr/lib64/sane/' directory. By copying them over I managed to get it to work.

So, far the full approach for an install is:

cd ~
gedit .bashrc
#enter the below lines at the end of the file, save it and close it (note no space between equals = sign
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
# export LD_LIBRARY_PATH

cd /etc/ld.so.conf.d/
sudo gedit lib64.conf
# Add the below line in the file lib64.conf
# /usr/lib64/

# restart the machine and then run the command to load the libraries and the plugin command is sometimes
# needed before the full drivers install for some reason :(
sudo ldconfig
sudo hp-plugin -g
sh hplip-3.11.10.run

# Then run the below commands to test that scanning is working
ls -alt /usr/lib64/sane/
sudo cp /usr/lib64/sane/*.* /usr/lib/sane/
scanimage -L

Which gives me and out put of:
device `hpaio:/net/HP_Color_LaserJet_CM2320nf_MFP?zc=NPI7887E4' is a Hewlett-Packard HP_Color_LaserJet_CM2320nf_MFP all-in-one

And Simple Scan now works.

But I am not sure this is the correct way to install the drivers properly as it seems a lot of manual work outside the install script. Is there a proper way to install them?

Regards Rick

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi Rickard,

Thank you for your information.

in Ubuntu 11.10 distro, OS team removed soft link for /usr/lib-->/usr/lib64. Hence sane is failing to load the required library files and not detecting any scanner.
before Ubuntu 11.10 (i.e. 11.04 and 10.10 etc) versions, used to have soft link for lib64 and lib. (i.e. /usr/lib-->/usr/lib64). Here used to work properly.
Ubuntu OS team has to look into this issue.

I think, you can go ahead with your work around.

Please let us know if you need more information.

Thanks & regards,
Amarnath

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
Okay I can understand the softlink is not there and I needed to recreate it with a workaround. But if they put the softlink back would the hpaio drivers then be created in the directory '/usr/lib/sane/' as they were under 11.04 x64 edition?

As at the moment they in '/usr/lib64/sane/' and is that due to the softlink of the current HP install process?

Regards Rick

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi Rickard,

if the softlink is present, both "/usr/lib64/sane/" and "/usr/lib/sane/" directories pionts to the same.
Anyhow, we are working with ubuntu distro team to solve this.

Please let us know if you need further information.

Thanks & Regards,
Amarnath

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
Okay great. Do you have a link to the Bug that is raised with Ubuntu, thanks.

Revision history for this message
R.Srinivasan (srini-vassan) wrote :

I tried the solution mentioned in the answers (hplip 3.11.10 with Ubuntu 11.10 x64 and HP 6500 HPLIP Questions Question #174891). My printer P1007 worked. The steps are below. I don't know which one solved the problem.

Initially the hpmudext problem came.

  File "/usr/bin/hp-setup", line 45, in <module>
    from base import device, utils, tui, models, module
  File "/usr/share/hplip/base/device.py", line 39, in <module>
    import status
  File "/usr/share/hplip/base/status.py", line 45, in <module>
    import hpmudext
ImportError: libhpmud.so.0: cannot open shared object file: No such file or directory

In my machine i was having Python 2.6 and 2.7. I tried to give the simulink for this file from 2.6 -- 2.7 folder. This file ( libhpmud.so) was only available in Python 2.7. That did not worked. I removed the Phython 2.6 version altogether. Complete removal including gwibber which was using this version.

Then open terminal and typed in the below command:
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/"

Also created the file .bashrc ( it was not there)
enter the below lines

LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/lib64/
export LD_LIBRARY_PATH

Also created one more file as mentioned below.

goutamkk (goutam-hplip) said on 2011-10-23: #19

Hi Pavel and Thomaz

1. Enter the folder /etc/ld.so.conf.d/
    $ cd /etc/ld.so.conf.d/

2. create a "conf" file by name "lib64.conf".
    $vim lib64.conf

3. Add the line /usr/lib64/ in the file lib64.conf

4. Run command "sudo ldconfig" to load the libraries.

5. Next run commad "hp-setup -g" and check whether you are able to setup your device. And post me the terminal output of this command.

Sorry for inconvenience.

Thanks & Regards,
Goutam Kodu

then tried the hp-setup -g

it was poping up an window asking to select the device. Selected USB device and continued the questions. Finally got installed properly using HPLIP 3.11.10.

Thanks for the support from Ubuntu people.

R.Srinivasan.

Revision history for this message
Rickard (rickard-uk) wrote :

Nice,
I would still like the URL to this bug that is registered with Ubuntu so, I can chase it too with them. Otherwise this will not be fixed in time for the 12.04 which is a LTS release. We need to get it in that to make sure we have a good release for long term support :)

Can you supply the URL for this bug with Ubuntu please?

affects: hplip (Ubuntu) → ubuntu
Changed in ubuntu:
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The problem is that from Oneiric on the symlink /usr/lib64 -> /usr/lib was dropped, probably due to the introduction of the new multiarch support. The upstream HPLIP package seems to install some libraries into /usr/lib64, creating this directory if it is missing. As I have no idea which package created this symlink (it did it probably via the postinstall script) I have added this package-less Ubuntu task now and assigned the bug to Steve Langasek. Steve, please correct the package selection appropriately. Thanks.

affects: ubuntu → hplip (Ubuntu)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have discussed with Adam Conrad and Steve Langasek on IRC and we came to the conclusion that this is not a bug in Ubuntu. The Upstream installer of HPLIP should get distribution-dependent here and install the 64-bit libraries/binaries in /usr/lib and not in /usr/lib64 for Debian, Ubuntu and derivatives, as in these distros /usr/lib means "native binaries of the processor/OS" and not "32-bit binaries".

Changed in hplip (Ubuntu):
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

Yes, this is a result of multiarch. Specifically, the availability of cross-installable packages means that both the /lib64 -> /lib and /usr/lib64 -> /usr/lib symlinks, which were always a crutch, are now a serious liability, because following this symlink on a 32-bit system can result in clobbering the 32-bit libraries and breaking the system software.

The eglibc package has been updated in oneiric and above to provide /lib64 as a separate directory, not a symlink; and to not provide /usr/lib64 at all. These will *not* be reintroduced as symlinks; having cross-installation of packages break the system libraries is a much worse problem than having upstream software that's not integrated with Ubuntu fail to work when installed.

The best solution here is for hplip upstream to check if it's on a Debian or Ubuntu system (probably by checking for the presence of /etc/debian_version) and if so, to use /usr/lib as the install path instead of /usr/lib64.

On the Ubuntu side, we can conceivably add /usr/lib64 to the search path for the x86_64 linker (both the libc6:amd64 and libc6-amd64:i386 packages), but this certainly comes with a maintenance cost, so I'm not sure we want to do this.

affects: hplip (Ubuntu) → eglibc (Ubuntu)
Changed in eglibc (Ubuntu):
assignee: Steve Langasek (vorlon) → nobody
importance: Undecided → Low
status: Invalid → Triaged
tags: added: multiarch
Revision history for this message
goutam kodu (goutam-hplip) wrote :

Committing the fix for this in the next release of HPLIP.

Changed in hplip:
status: In Progress → Fix Committed
Revision history for this message
Rickard (rickard-uk) wrote :

In which version of the drivers has these been committed too and the expected ETA of these?
Thanks.

Changed in eglibc (Ubuntu):
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Steve Langasek (vorlon)
Changed in eglibc (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Sarbeswar Meher (sarbeswar-meher) wrote :

The fix has been given in HPLIP 3.11.12 which can be downloaded from http://hplipopensource.com/hplip-web/index.html .

Changed in hplip:
status: Fix Committed → Fix Released
Revision history for this message
Rickard (rickard-uk) wrote :

I can see you can download it from this link:
http://hplipopensource.com/hplip-web/gethplip.html

But it is not available from the installation wizard. So, I cannot validate that this is 100% openly released. As the wizard does not allow me to download it.

Revision history for this message
Rickard (rickard-uk) wrote :

Hi,
I have tested it on 2 computers now with Ubuntu 11.10.

1st Computer:
Works OOTB with no issues.

2nd Computer:
This was performed a few days later and when it comes to the plug-in part it now waits ages, like hours before I get a warning dialog that the web URL the program is downloading the plug-in from is not certified (maybe it has just elapsed?). If ignore this warning then it installs OOTB.

So, if you can fix the cert issue and make it available from the online wizard then I think we are good.
Scanning also works for both machines :)

BTW:
Is it not possible to get the script and plug-in included into Ubuntu 12.04 OOTB as this will be a LTS release?
So, it will be a change that will last and last :)

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.