(SOLVED) Printing with Lexmark in Karmic

Hi, tonight my wife bring home a printer from her school. It's a Lexmark Z615 printer. She asked me to install the printer so that she can print her school work
Ubuntu automatically detected the USB port's connected printer but it reports that there was no driver for the printer. I'll started to look for answers in the ubuntuforums.org, ubuntu wikis and other blogs and website but no complete guide was found. I still can't print!
So, by combining those guides, I decided to blog about it! Just to help those who are in need (like me, tonight..) :P
Ok, let us start. The first thing is, this guide is for Karmic and Lexmark 600 series. I don't know if this guide will work with other versions and/or other printer models. However it should work with Karmic derivatives. Just for your information, Lexmark Z615 worked well in Jaunty using the guides I found in the forums and wikis but did not work in Karmic due to the libstdc++5 library file. This file is exist in Jaunty but not in Karmic.


The second thing is before we could even start we have to install alien and libstdc++5 manually. We also have to download the Lexmark Z615 linux driver file from the Lexmark site. The driver file actually is for Red Hat based distro which is in .rpm format. That's why we need alien to convert those .rpm's files into .deb package!  
Alright then, first install alien.
sudo apt-get install alien
Then install the i386 libstdc++5 package for Jaunty here: 
http://packages.ubuntu.com/jaunty/i386/libstdc++5/download         (When you are there, please click on any links which could work for you and I suggest you put the file downloaded into /home/yourusername/
Open the Terminal and copy paste this one by one:

         ar vx ~/Desktop/libstdc++5_3.3.6-17ubuntu1_i386.deb

tar -xzvf data.tar.gz
sudo mkdir /usr/lib32
sudo install /usr/lib/libstdc++.so.5.0.7 /usr/lib32
cd /usr/lib32
sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
Then, when all that finished without error, download the Lexmark Z600 series driver for Linux here:
Click here to download the driver (Please put the file downloaded into /home/yourusername/)
To install and setup your new driver, run these command one by one in a NEW terminal:




mkdir lexmark
mv CJLZ600LE-CUPS-1.0-1.TAR.gz lexmark
cd lexmark
tar -xvzf CJLZ600LE-CUPS-1.0-1.TAR.gz
tail -n +143 z600cups-1.0-1.gz.sh > install.tar.gz
tar -xvzf install.tar.gz
alien -t z600cups-1.0-1.i386.rpm
alien -t z600llpddk-2.0-1.i386.rpm
sudo tar xvzf  z600llpddk-2.0.tgz -C /
sudo tar xvzf z600cups-1.0.tgz -C /
 # DO NOT SKIP THIS STEP or your printer backend won't find required libraries
sudo ldconfig
cd /usr/share/cups/model
sudo gunzip Lexmark-Z600-lxz600cj-cups.ppd.gz
sudo /etc/init.d/cups restart
After that please disconnect and reconnect the printer USB cable into your computer's USB ports and let the hardware detection wizard do its work!

During the detection, you may need to choose, "Select printer from database".
If this happens, then, please choose Lexmark and then scroll down to choose model Z600. It is the last title in the list.
You should see the "Lexmark Z600 v1.0.1[en] (recommended)" driver on the left panel. Just follow the instructions and then try to print a test page at the end of it!
Hopes this helps. Please don't be shy and send me a comment!

Ref :