How can I fix the Lexmark X5650 printer driver package on Ubuntu 14.04LTS

Asked by jycg on 2015-01-08

Problem: When installing the Lexmark x5650 driver package for Ubuntu Linux the installation will fail with the following exception: dpkg: error processing archive lexmark-08z-series-driver-1.0-1.i386.deb (--install): parsing file '/var/lib/dpkg/tmp.ci/control' near line 9 package 'lexmark-08z-series-driver': blank line in value of field 'Description'

Following is a solution I developed for this problem that hopefully will benefit anyone who still has a Lexmark x5650 or similar class of printer and has encountered this issue since moving to Linux from Windows or upgrading to a higher revision/version of Ubuntu Linux. Good luck.

Error produced when installing the commercial driver package from Lexmark for the X5650 printer on Ubuntu Linux 14.04LTS.

Execute: dpkg -i --force-architecture lexmark-08z-series-driver-1.0-1.i386.deb > /tmp/x5650/pkg/files/dpkg_msgs
dpkg: error processing archive lexmark-08z-series-driver-1.0-1.i386.deb (--install): parsing file '/var/lib/dpkg/tmp.ci/control' near line 9 package 'lexmark-08z-series-driver': blank line in value of field 'Description'

The source control file provided in the .deb package contains spaces/blank lines that have to be removed.

To get at the control file to edit it and then rebuild the commercial package with the revised control file for installation you will need to break up the package file provided from Lexmark.

As of this writing the Lexmark x5650 driver package for Ubuntu Linux is available at the following location: http://support.lexmark.com/index?page=product&locale=en&productCode=LEXMARK_X5650&segment=SUPPORT&userlocale=EN#1

I donwloaded the Ubuntu 10.10 version for installation on Ubuntu 14.04LTS.

All commands will need to be done with sudo permissions to avoid permission issues throughoutthe entire process.

$ cd /tmp
$ mkdir x5650
$ cp lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz x5650
$ cd x5650
$ cksum lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz
3871870553 23536150 lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz
$ tar zxf lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz
$ ./lexmark-08z-series-driver-1.0-1.i386.deb.sh --tar -xf

Now execute the startupinstaller.sh script and perform all the required steps until it fails and then exit.

$ sudo ./startupinstaller.sh

After the process fails a couple of additional files will have been unpacked and created.
The file arch.tar is the one of interest since it will contain the actual .deb file for the x5650 printer drivers:

$ tar xvf arch.tar

$ mkdir debtmp
$ cp -p lexmark-08z-series-driver-1.0-1.i386.deb debtmp
$ ar vx lexmark-08z-series-driver-1.0-1.i386.deb

Three files will be extracted:
x - debian-binary (Do not touch)
x - control.tar.gz (Config and scripts to install and uninstall)
x - data.tar.gz (Files to be installed. This file may have a different extension, depending on the compression format used.)

Unpack the control.tar.gz file.

$ tar zxvf control.tar.gz
./
./prerm
./md5sum
./postinst
./preinst
./control

Fix the control file using your favorite editor (such as vi) to remove spaces and blank lines and rebuild the deb packaqe. The source file that comes with the original package has the following content(note the spaces and blank line after the 'Description:' tag):

$ cat control
Package: lexmark-08z-series-driver
Version: 1.0-1
Section: non-free
Priority: optional
Architecture: i386
Installed-Size:
Maintainer: build <build@linux>
Description:
 Lexmark 08z Series Drivers Package

 This package contains the Lexmark 08z Series Drivers. This is
 a copyrighted package, please refer to the copyright notice
 for details about using this product.

Edit the file so that it contains the following content. The should be no spaces or blank lines after the line with the 'Description:' tag)

$ cat control
Package: lexmark-08z-series-driver
Version: 1.0-1
Section: non-free
Priority: optional
Architecture: i386
Installed-Size:
Maintainer: build <build@linux>
Description: Lexmark 08z Series Drivers Package

Original control file archive:
$ cksum control.tar.gz
347574396 5269 control.tar.gz

Recreate the modified control file archive (one in current directory will be ovewritten).

$ tar -czvf control.tar.gz prerm md5sum postinst preinst control

Modified control file archive:
$ cksum control.tar.gz
3997655977 5189 control.tar.gz

Now recreate the revised .deb package for installation. The order is very important here.

$ ar rv revised-lexmark-08z-series-driver-1.0-1.i386.deb debian-binary control.tar.gz data.tar.gz

$ cksum revised-lexmark-08z-series-driver-1.0-1.i386.deb
1299661573 22422526 revised-lexmark-08z-series-driver-1.0-1.i386.deb

Then use dpkg from the command line or a supported GUI front-end by browsing through the file manager to click on the package file to install the revised package.

Once the package is installed use the following URL in your browser to access the CUPS subsystem to configure your printer:
http://localhost:631/

If your printer is recognized by the operating system it will show up when you use add printer to configure it in CUPS.
If not, you may have to reboot to have the operating system recognize the printer. Also, you may have to unplug/plug-in power/usb cables for the printer as well.
Lexmark usb printers have some quirky behaviors in getting them recognized by Windows or Linux.

If it does not show as being recognized when you use 'lsusb' then the OS does not see it.

Could not have done this package fix without the methods provided in the below references. Hence many thanks and kudos for these.

References:
http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
http://superuser.com/questions/714420/how-do-i-fix-a-bad-commercial-deb-package

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
jycg
Solved:
2015-01-09
Last query:
2015-01-09
Last reply:
2015-01-08

Glad you reached the gold.

What is the question here please?

jycg (j-canning01) said : #2

The real question I suppose is how do I fix the problem with the Lexmark x5650 package when trying to install it on Ubuntu Linux where it fails with the indicated exception. I spent many weeks researching for a solution to this problem since I did not want to toss a perfectly good printer once I changed the OS on my laptop from Windows to Ubuntu Linux 14.04LTS. I found a number of references to the same problem from other owners of the same printer but found no solution to the problem. Since Lexmark is/was not going to provide a solution I decided to try to find a solution myself. So, in order to benefit any individual who may still have this printer or a similar Lexmark x56xx class I felt it would be useful to post all the details of the solution I developed as a question&solution format in one posting. Hope this answers any further queries as to what this is all about.

Cheers.

jycg (j-canning01) said : #3

Closed.