Linux
Apache
MySQL
PHP

CSS
XHTML1.1
XML/RSS

Creative Commons

2014-12-01 08:43:11

Canon Pixma MX882 on CentOS Linux

My sister didn't need her printer from college anymore and my parents wanted to use it on the spare laptop that I configured with CentOS 6.5. Normally, on Linux, you can print to any printer by using a generic PS or PCL driver. That, however, is not the case with the Canon. I couldn't even get garbage to print out (a tell-tale sign of a bad driver). Nothing would happen. So after a few minutes searching the Googles I came across some forums that said Canon released a driver for their MX line for Linux.

The driver wasn't available on Canon's page (at least not that I could find) so I luckily found it attached to a forum post. As is normally the case, once I untarred the download I found that the drivers were in DEB format (for Debian-based systems, not CentOS, which uses RPM). Thankfully, I've run into this problem before. There is a program called Alien that knows how to convert files from one package format to another, but, like the Canon driver, finding it was an adventure.

Any download of Alien I found wasn't the actual binary, but thankfully I ran across a Git repository with the source. So I cloned the repo and built the binary:

git clone git://git.kitenet.net/alien cd alien perl Makefile.PL make make install

I should note that in order to build Alien I had to install rpm-build.

Once Alien was built, I untarred the cnijfilter download (the MX driver) and got to work. In the "packages" directory is where the DEB files live. There are 4: 2 for each architecture, 32-bit (i386) and 64-bit (amd64). For the 2 packages I needed (both 32-bit), I converted the DEB files to RPM files:

alien -r cnijfilter-common_3.50-1_i386.deb alien -r cnijfilter-mx880series_3.50-1_i386.deb

That produced 2 RPM files with similar names. Installing the rpm files in the same order, RPM complained that I was missing some dependencies, specifically libtiff.so.4. Usually when working with DEB files that have been turned into RPMs you'll run into "dependency problems". I put that in quotes because most of the time they're not really problems; the DEB files look for dependencies with certain names that RPM doesn't use. Even though you have the deps installed the converted RPMs don't realize it. Just to be sure, I looked for libtiff and sure enough, I had it. However, it was an older version (libtiff.so.3.4). Just to be safe, I linked it to the name that cnijfilter wanted.

cd /usr/lib ln -s libtiff.so.3.4 libtiff.so.4

Then I proceeded to install both RPMs, ignoring the broken dependencies.

rpm -Uvh --nodeps cnijfilter-common-3.50-2.i386.rpm rpm -Uvh --nodeps cnijfilter-mx880series-3.50-2.i386.rpm

I tried the printer with the newly installed driver and it still didn't work. Let's see what was just installed.

rpm -ql cnijfilter-mx880series

That listed all files installed by that package... too many to list. But if you look at the beginning of the list you'll see some utilities in /usr/bin. Some Googling showed that one of these was an admin program for the new driver, printuimx880, so I ran it. It immediately died, stating that it couldn't find certain libraries that began with "libcnb". Looking in /usr/lib I found a bunch of libraries there that were just installed, but they had different names. The printuimx880 binary was looking for libcnb*.so but the files I had were libcnb*.so.#.#.# (3 numbers on the end). Again, I had to do some symbolic linking to make this work. I'll only show you how to link one of the files, but you need to do this for every file in /usr/lib that starts with "libcnb".

cd /usr/lib ln -s libcnbpcnclui383.so.3.6.0 libcnbpcnclui383.so

This was what was preventing the Canon driver from working properly. As long as you've installed the printer and chosen the Canon MX880 driver, your printer will work.

To help, here are the files I used during this post.

Back


Post a comment!

Name:
Comment: