Installing Lexmark Linux Drivers in 64-bit Debian-Based Distributions
Monday, 01 March 2010 01:34

Very recently, Lexmark (finally!) released Linux drivers for its all-in-one home printer models. The package "lexmark-08z-series-driver-1.0-1.i386.rpm.sh.tar.gz" can be downloaded here, and is said to be a "Linux Driver for Lexmark x7600 Series, x5600 Series, z2400 Series, x4900 Series, x3600 Series for Linux". Having tried to reverse engineer the Lexmark network printing protocol (HBN3), this release came as a surprise. Maybe Lexmark realized that Linux was not only good for making cheap printer servers on their wireless printers, but that it was now used by ordinary people at home. Ok, while this driver is a great gift, I was totally expecting that: a 32-bit rpm package. Something tells me that 1) a lot of people are now running 64-bit linux and 2) a lot of them are NOT using an rpm-based Linux distribution such as red hat or openSUSE. As I'm using either 64-bit Debian or Ubuntu on most of my computers, I had to find a way to make it work anyway. Oh, and for some odd reason, their installation instructions will tell you that Ubuntu 9.10 is supported, and to use the non-existing .deb package for Debian-based distributions. It looks like someone made a mistake about the existence of such a package, or there's someone at Lexmark that forgot to put the .deb package on their website for download. Quick googling gave me some results about people asking if anybody was able to make it work in 64-bit Debian-based distributions. This article will show you how I was able to make it work in Debian Sid, but steps should be very similar if not the same in Ubuntu. I'd expect similar steps for work for 32-bit Debian-based distributions as well.

 

EDIT: After writing this article, I figured out the real download location of "lexmark-08z-series-driver-1.0-1.i386.rpm.sh.tar.gz", and then just replaced "rpm" by "deb" in the name just to see if it would work. It turns out that the .deb version of the package is out there, as it worked. You can download "lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz" here. The installer generates a .deb package and then installs it with the "--force" option which ignores the current architecture, so the installation will be successful. You may still however lack 32-bit dependencies, so if it doesn't work out of the box please read the section of this article about solving those kind of problems. I'm mirroring the package here in case the original link goes down.


1. Extracting the Installation Files

 

First, extract the contents of the archive:

 

aghaster@awake:~$ tar zxvf lexmark-08z-series-driver-1.0-1.i386.rpm.sh.tar.gz
lexmark-08z-series-driver-1.0-1.i386.rpm.sh

 

You now have a script that will extract the contents of the installer in a temporary folder and run it from there. The problem here is that 1) the installation will fail and 2) the installer deletes the temporary files before closing. To get around this problem, we will run the installer and create a backup copy of the temporary files before closing it. In a terminal, start the installer:

 

aghaster@awake:~$ ./lexmark-08z-series-driver-1.0-1.i386.rpm.sh
Verifying archive integrity... All good.
Uncompressing nixstaller..............................................................
Collecting info for this system...
Operating system: linux
CPU Arch: x86_64
Warning: No installer for "x86_64" found, defaulting to x86...
TRACKING IDENT = 170209
cpu speed = 1200 MHz
ram size = 3865.8671875 MB
hd avail = 48665 MB
/usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
/usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgiogconf.so
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so

 

Now, in a second terminal (or just by browsing the files with your favorite file manager such as nautilus), go to /tmp and look for a folder with a name similar to "selfgz3382"

 

aghaster@awake:/tmp$ ls selfgz3382/
about              instarchive_all          rpm.lua
bin                instarchive_all.sizes    selectdirscreen.lua
config             langscreen.lua           slack.lua
deb.lua            lexribbon.png            startupinstaller.sh
files_extra        licensescreen.lua        summaryscreen.lua
finishscreen.lua   packagedirscreen.lua     utils.lua
generic.lua        package.lua              utils-public.lua
groups.lua         package-public.lua       welcomescreen.lua
info               packagetogglescreen.lua  xdg-utils
install.lua        pacman.lua
installscreen.lua  pkg
aghaster@awake:/tmp$ cp -R selfgz3382/ ~
aghaster@awake:/tmp$ cd ~
aghaster@awake:~$ cd selfgz3382/
aghaster@awake:~/selfgz3382$

 

As root, run the installer from the backup copy:

 

root@awake:~/selfgz3382# ./startupinstaller.sh
Collecting info for this system...
Operating system: linux
CPU Arch: x86_64
Warning: No installer for "x86_64" found, defaulting to x86...
TRACKING IDENT = 170209
cpu speed = 1200 MHz
ram size = 3865.8671875 MB
hd avail = 48526 MB
/usr/lib/gio/modules/libgioremote-volume-monitor.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgioremote-volume-monitor.so
/usr/lib/gio/modules/libgiogconf.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgiogconf.so
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so

 

Follow the instructions, and let the installer fail to install the package. We don't care if the installer fails, as all we want is the temporary package file it will create. You should now have an "arch.tar" archive. Extract it:

 

root@awake:~/selfgz3382# tar xvf arch.tar
printdriver.te
lexmark-08z-series-driver-1.0-1.i386.rpm
launcher.c
launcher
lsbrowser
lsusbdevice

 

The file of interest here is lexmark-08z-series-driver-1.0-1.i386.rpm. We will not attempt to convert the rpm package to a deb package using alien, but we will simply extract its contents and do the installation manually:

 

root@awake:~/selfgz3382# rpm2cpio lexmark-08z-series-driver-1.0-1.i386.rpm | cpio -idmv
./usr/local/lexmark
./usr/local/lexmark/08z-series-driver.link
./usr/local/lexmark/08z-series-driver.unlink
./usr/local/lexmark/08zero
./usr/local/lexmark/08zero/bin
./usr/local/lexmark/08zero/bin/.scripts
./usr/local/lexmark/08zero/bin/.scripts/apparmor.pl
./usr/local/lexmark/08zero/bin/.scripts/lsbrowser
./usr/local/lexmark/08zero/bin/.scripts/lsusbdevice
./usr/local/lexmark/08zero/bin/lxk08zusb
./usr/local/lexmark/08zero/bin/printdriver
./usr/local/lexmark/08zero/bin/prnutility
./usr/local/lexmark/08zero/docs
./usr/local/lexmark/08zero/docs/license.txt
./usr/local/lexmark/08zero/docs/readme.txt
./usr/local/lexmark/08zero/etc
./usr/local/lexmark/08zero/etc/99-lexmark-08z.rules
./usr/local/lexmark/08zero/etc/Lexmark-logo.xpm
./usr/local/lexmark/08zero/etc/Lexmark08_1_0_0.conf
./usr/local/lexmark/08zero/etc/lx36-46.ppd
./usr/local/lexmark/08zero/etc/lx4900.ppd
./usr/local/lexmark/08zero/etc/lx56-66.ppd
./usr/local/lexmark/08zero/etc/lx7600.ppd
./usr/local/lexmark/08zero/etc/lxZ2400.ppd
./usr/local/lexmark/08zero/etc/lxdq.conf
./usr/local/lexmark/08zero/etc/lxdqclr1.lut
./usr/local/lexmark/08zero/etc/lxdqclr2.lut
./usr/local/lexmark/08zero/etc/lxdqclr3.lut
./usr/local/lexmark/08zero/etc/lxdr.conf
./usr/local/lexmark/08zero/etc/lxdrSCc0.bin
./usr/local/lexmark/08zero/etc/lxdrSCg0.bin
./usr/local/lexmark/08zero/etc/lxdrclr1.lut
./usr/local/lexmark/08zero/etc/lxdrclr2.lut
./usr/local/lexmark/08zero/etc/lxdrclr3.lut
./usr/local/lexmark/08zero/etc/lxdrscan.conf
./usr/local/lexmark/08zero/etc/lxdu.conf
./usr/local/lexmark/08zero/etc/lxduSCc0.bin
./usr/local/lexmark/08zero/etc/lxduSCg0.bin
./usr/local/lexmark/08zero/etc/lxduclr1.lut
./usr/local/lexmark/08zero/etc/lxduclr2.lut
./usr/local/lexmark/08zero/etc/lxduclr3.lut
./usr/local/lexmark/08zero/etc/lxduscan.conf
./usr/local/lexmark/08zero/etc/lxdw.conf
./usr/local/lexmark/08zero/etc/lxdwSCc0.bin
./usr/local/lexmark/08zero/etc/lxdwSCg0.bin
./usr/local/lexmark/08zero/etc/lxdwclr1.lut
./usr/local/lexmark/08zero/etc/lxdwclr2.lut
./usr/local/lexmark/08zero/etc/lxdwclr3.lut
./usr/local/lexmark/08zero/etc/lxdwscan.conf
./usr/local/lexmark/08zero/etc/lxdx.conf
./usr/local/lexmark/08zero/etc/lxdxSCc0.bin
./usr/local/lexmark/08zero/etc/lxdxSCg0.bin
./usr/local/lexmark/08zero/etc/lxdxclr1.lut
./usr/local/lexmark/08zero/etc/lxdxclr2.lut
./usr/local/lexmark/08zero/etc/lxdxclr3.lut
./usr/local/lexmark/08zero/etc/lxdxscan.conf
./usr/local/lexmark/08zero/etc/testpage.pdf
./usr/local/lexmark/08zero/lib
./usr/local/lexmark/08zero/lib/libScanCorrect.so.2.0
./usr/local/lexmark/08zero/lib/libhdctransport.so
./usr/local/lexmark/08zero/lib/liblxdqflib.so
./usr/local/lexmark/08zero/lib/liblxdqhpec.so
./usr/local/lexmark/08zero/lib/liblxdqhpeh.so
./usr/local/lexmark/08zero/lib/liblxdqhpep.so
./usr/local/lexmark/08zero/lib/liblxdrflib.so
./usr/local/lexmark/08zero/lib/liblxdrhpec.so
./usr/local/lexmark/08zero/lib/liblxdrhpeh.so
./usr/local/lexmark/08zero/lib/liblxdrhpep.so
./usr/local/lexmark/08zero/lib/liblxduflib.so
./usr/local/lexmark/08zero/lib/liblxduhpec.so
./usr/local/lexmark/08zero/lib/liblxduhpeh.so
./usr/local/lexmark/08zero/lib/liblxduhpep.so
./usr/local/lexmark/08zero/lib/liblxdwflib.so
./usr/local/lexmark/08zero/lib/liblxdwhpec.so
./usr/local/lexmark/08zero/lib/liblxdwhpeh.so
./usr/local/lexmark/08zero/lib/liblxdwhpep.so
./usr/local/lexmark/08zero/lib/liblxdxflib.so
./usr/local/lexmark/08zero/lib/liblxdxhpec.so
./usr/local/lexmark/08zero/lib/liblxdxhpeh.so
./usr/local/lexmark/08zero/lib/liblxdxhpep.so
./usr/local/lexmark/08zero/lib/libnpa407.so
./usr/local/lexmark/08zero/lib/libprintengine.so
./usr/local/lexmark/08zero/lib/libprinterdictionary.so
./usr/local/lexmark/08zero/lib/libsane-Lexmark08_1_0_0.so.1.0.18
./usr/local/lexmark/08zero/lib/libuiocli.so
./usr/local/lexmark/08zero/lib/libuiocmd.so
./usr/local/lexmark/08zero/lib/libusblp.so
49798 blocks

 

2. Installing the Files Manually

 

After extracting the contents of the rpm package, copy the files to their final destination:


root@awake:~/selfgz3382# cp -R ./usr /

 

Now move to /usr/local/lexmark and run the "08z-series-driver.link" script with "/usr/local/lexmark" as a parameter:

 

root@awake:~/selfgz3382# cd /usr/local/lexmark
root@awake:/usr/local/lexmark# ls
08zero  08z-series-driver.link  08z-series-driver.unlink
root@awake:/usr/local/lexmark# ./08z-series-driver.link /usr/local/lexmark
-- Updating symbolic links

 

The above script creates symbolic links to your Lexmark files. Verify that they were properly created:

 

root@awake:/usr/local/lexmark# ls -l /usr/lexinkjet/
total 0
lrwxrwxrwx 1 root root 25 2010-03-01 19:46 08zero -> /usr/local/lexmark/08zero
root@awake:/usr/local/lexmark# ls -l /usr/lib/liblx*
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqflib -> /usr/local/lexmark/08zero/lib/liblxdqflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqflib.so -> /usr/local/lexmark/08zero/lib/liblxdqflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpec -> /usr/local/lexmark/08zero/lib/liblxdqhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpec.so -> /usr/local/lexmark/08zero/lib/liblxdqhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpeh -> /usr/local/lexmark/08zero/lib/liblxdqhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpeh.so -> /usr/local/lexmark/08zero/lib/liblxdqhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpep -> /usr/local/lexmark/08zero/lib/liblxdqhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdqhpep.so -> /usr/local/lexmark/08zero/lib/liblxdqhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrflib -> /usr/local/lexmark/08zero/lib/liblxdrflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrflib.so -> /usr/local/lexmark/08zero/lib/liblxdrflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpec -> /usr/local/lexmark/08zero/lib/liblxdrhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpec.so -> /usr/local/lexmark/08zero/lib/liblxdrhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpeh -> /usr/local/lexmark/08zero/lib/liblxdrhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpeh.so -> /usr/local/lexmark/08zero/lib/liblxdrhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpep -> /usr/local/lexmark/08zero/lib/liblxdrhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdrhpep.so -> /usr/local/lexmark/08zero/lib/liblxdrhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduflib -> /usr/local/lexmark/08zero/lib/liblxduflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduflib.so -> /usr/local/lexmark/08zero/lib/liblxduflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpec -> /usr/local/lexmark/08zero/lib/liblxduhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpec.so -> /usr/local/lexmark/08zero/lib/liblxduhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpeh -> /usr/local/lexmark/08zero/lib/liblxduhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpeh.so -> /usr/local/lexmark/08zero/lib/liblxduhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpep -> /usr/local/lexmark/08zero/lib/liblxduhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxduhpep.so -> /usr/local/lexmark/08zero/lib/liblxduhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwflib -> /usr/local/lexmark/08zero/lib/liblxdwflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwflib.so -> /usr/local/lexmark/08zero/lib/liblxdwflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpec -> /usr/local/lexmark/08zero/lib/liblxdwhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpec.so -> /usr/local/lexmark/08zero/lib/liblxdwhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpeh -> /usr/local/lexmark/08zero/lib/liblxdwhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpeh.so -> /usr/local/lexmark/08zero/lib/liblxdwhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpep -> /usr/local/lexmark/08zero/lib/liblxdwhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdwhpep.so -> /usr/local/lexmark/08zero/lib/liblxdwhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxflib -> /usr/local/lexmark/08zero/lib/liblxdxflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxflib.so -> /usr/local/lexmark/08zero/lib/liblxdxflib.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpec -> /usr/local/lexmark/08zero/lib/liblxdxhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpec.so -> /usr/local/lexmark/08zero/lib/liblxdxhpec.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpeh -> /usr/local/lexmark/08zero/lib/liblxdxhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpeh.so -> /usr/local/lexmark/08zero/lib/liblxdxhpeh.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpep -> /usr/local/lexmark/08zero/lib/liblxdxhpep.so
lrwxrwxrwx 1 root root 44 2010-03-01 19:46 /usr/lib/liblxdxhpep.so -> /usr/local/lexmark/08zero/lib/liblxdxhpep.so

 

Next, add a symlink in /usr/lib/cups/backend from lxbusb to lxk08usb. This is needed as CUPS will try to use "lxkusb" and not "lxk08usb":

 

root@awake:/usr/lexinkjet/08zero/bin# cd /usr/lib/cups/backend/
root@awake:/usr/lib/cups/backend# ln -s lxk08zusb lxkusb
root@awake:/usr/lib/cups/backend# ls -l | grep lxk
lrwxrwxrwx 1 root root    39 2010-03-01 19:46 lxk08zusb -> /usr/local/lexmark/08zero/bin/lxk08zusb
lrwxrwxrwx 1 root root     9 2010-03-01 20:16 lxkusb -> lxk08zusb

 

3. Resolving Missing 32-bit Dependencies

 

The 32-bit binaries that may cause problems are located in "/usr/lexinkjet/08zero/bin":

 

root@awake:/usr/local/lexmark# cd /usr/lexinkjet/08zero/bin
root@awake:/usr/lexinkjet/08zero/bin# ls -l
total 164
-rwxr-xr-x 1 root root 25028 2010-03-01 19:45 lxk08zusb
-rwxr-xr-x 1 root root 63851 2010-03-01 19:45 printdriver
-rwxr-xr-x 1 root root 72839 2010-03-01 19:45 prnutility

 

Run ldd to check for missing shared libraries. If the following command returns nothing:


root@awake:/usr/lexinkjet/08zero/bin# ldd lxk08zusb printdriver prnutility | grep "not found"

 

Then all dependencies are satisfied. On Ubuntu 9.10, I didn't have missing shared libraries, but in Debian I did:

 

root@sidux:/usr/lexinkjet/08zero/bin# ldd lxk08zusb printdriver prnutility | grep "not found"
libcupsimage.so.2 => not found

 

To solve this problem, I downloaded the 32-bit libcupsimage .deb package from the Debian website, extracted its contents and then manually copied libcupsimage.so.2 to /usr/lib32. After copying libcupsimage.so.2, I checked again, to see that libcupsimage.so.2 had a dependency on libavahi-client and libavahi-common:

 

root@sidux:/usr/lexinkjet/08zero/bin# ldd lxk08zusb printdriver prnutility | grep "not found"
libavahi-common.so.3 => not found
libavahi-client.so.3 => not found

 

Simply manually install 32-bit shared libraries until ldd stops complaining.

 

4. Configuring CUPS

 

Before continuing, connect your Lexmark printer by USB to your Linux computer. Open your favorite browser and go to localhost:631. This is your CUPS configuration page, where you can add a new printer. Click on "Administration->Add Printer". You may see different entries listed that seem to match your Lexmark printer, but the one you need is "Lexmark USB Backend #1". All others won't work. If "Lexmark USB Backend #1" is not listed, then you won't be able to configure your printer. For some reason, while I could get it listed in Debian, I was unable to make it work in Ubuntu 9.10. If someone figures out why it doesn't work in Ubuntu, please mail me and I'll update this article. Here is what you should see:

 

 

Click "Continue" and follow instructions. When asked for a printer driver, choose to specify your own PPD file. The PPD files are located in "/usr/local/lexmark/08zero/etc". Here is what the installer's readme says about the PPD files:

 

Printer                            PPD
------------------------------------------------------
Lexmark Z2400 Series         ..... lxZ2400.ppd
Lexmark 3600-4600 Series     ..... lx36-46.ppd
Lexmark 4900 Series          ..... lx4900.ppd
Lexmark 5600-6600 Series     ..... lx56-66.ppd
Lexmark 7600 Series          ..... lx7600.ppd

 

In my case, I have a Lexmark x4690, so the correct ppd is lx36-46.ppd.

 

5. Conclusion

 

If your installation is successful, then you should be able to print a test page. If it doesn't work, don't give up. If you find any tricks not listed in this article, please mail me so that I update this article and make it easier for other people to install their Lexmark printer driver in Linux.