Canon MP640 working on Ubuntu x86_64

The Canon MP640 is printer, scanner and copier with lots of useful features. It is especially good for networks with it’s Wifi or LAN support.
The drivers for Windows are excellent but unfortunately the Canon Europe site at time of writing shows no Linux drivers are available. (Listed as TBD)

Searching around and some Linux drivers pop up on the Canon Asia site.
Linux mp640 debian printer driver
Linux mp640 debian scanner driver

I installed these on the 32 bit version of Ubuntu 9.10 (Karmic Koala) and it works fine with all the features of printer and scanner.

However if you try to install these drivers on 64 bit Ubuntu you get the architecture mismatch problem.

package architecture (i386) does not match system (amd64)

You can get around this problem by adding the --force-architecture to the dpkg command line in the install.sh script.
The dpkg line should appear like this in the script
sudo dpkg --force-architecture -iG $c_fpath_pkg_name
also need to add it to the allowed arguments
&& [ $C_argment != "--force-architecture" ]

One other problem needs to be addressed for the scanner software. scangearmp cannot find the 32 bit gimp libraries. This is fixed easily using getlibs to find and install the missing 32 bit dependencies.

getlibs /usr/bin/scangearmp

Now the MP640 can print and scan for 64-bit Ubuntu machines on the network.

    INSTALL.SH


The modified installer files working on x86_64 for the printer and scanner packages are at the links below.
Use these instead of the ones found in the .tar.gz (Note wordpress doesn’t allow .sh files to be uploaded so I’ve used .doc )
install.sh for cnijfilter
install.sh for scangearmp

cp install_sh_cnijfilter.doc cnijfilter-mp640series-3.20-1-i386-deb\install.sh
cp install_sh_scangearmp.doc scangearmp-mp640series-1.40-1-i386-deb\install.sh

Advertisements

22 Responses to Canon MP640 working on Ubuntu x86_64

  1. Tom Judd says:

    Thanks for blogging this. The open source printer drivers don’t work properly with my MP620, and without this I would never have realized that the canon provided *_i386.deb files would work on amd64.

  2. Interesting article. Were did you receive all the info from… 🙂

    • yellabelly says:

      I found the 32 bit linux drivers through searches but someone on the Ubuntu forum told me they had managed to get them working on x86_64 using “force-architecture”. It seems strange they didn’t allow for 64 bit considering they work perfectly.

  3. corwin78 says:

    Hello, thank for this post, but unfortunately I am not able modify install scripts properly. Or more precisely, printer driver is forking after manual install via dpkg, but scanner can’t be found. Can you please send me already modified scripts? Thanks.

    • yellabelly says:

      Here is the diff of the changes I made to install.sh. You should be able to apply these with the patch tool or just manually make the alterations.

      For cnijfilter-mp640series-3.20-1-i386-deb
      ==========================================

      *** install.sh 2010-01-15 10:37:25.000000000 +0000
      — install.sh.orig 2010-01-15 10:35:03.000000000 +0000
      ***************
      *** 1356,1362 ****
      local c_fpath_pkg_name=$1

      ## result -> 0:Install process complete, 1:Install process depend error ##
      ! C_FUNC_show_and_exec “sudo dpkg –force-architecture -iG $c_fpath_pkg_name”
      if [ $? != 0 ]; then
      return $C_ERR_CODE
      fi
      — 1356,1362 —-
      local c_fpath_pkg_name=$1

      ## result -> 0:Install process complete, 1:Install process depend error ##
      ! C_FUNC_show_and_exec “sudo dpkg -iG $c_fpath_pkg_name”
      if [ $? != 0 ]; then
      return $C_ERR_CODE
      fi
      ***************
      *** 1452,1458 ****
      if [ $# -ne 1 ]; then
      echo $C_err_msg3
      exit
      ! elif [ $C_argment != “–version” ] && [ $C_argment != “–uninstall” ] && [ $C_argment != “–force-architecture” ] && [ $C_argment != “–pkgconfig” ]; then
      echo $C_err_msg3
      exit
      fi
      — 1452,1458 —-
      if [ $# -ne 1 ]; then
      echo $C_err_msg3
      exit
      ! elif [ $C_argment != “–version” ] && [ $C_argment != “–uninstall” ] && [ $C_argment != “–pkgconfig” ]; then
      echo $C_err_msg3
      exit
      fi

      Much the same for scangearmp-mp640series-1.40-1-i386-deb
      ========================

      diff -c install.sh install.sh.orig
      *** install.sh 2010-01-15 10:52:47.000000000 +0000
      — install.sh.orig 2010-01-15 10:51:45.000000000 +0000
      ***************
      *** 319,325 ****
      local c_fpath_pkg_name=$1

      ## result -> 0:Install process complete, 1:Install process depend error ##
      ! C_FUNC_show_and_exec “sudo dpkg –force-architecture -iG $c_fpath_pkg_name”
      if [ $? != 0 ]; then
      return $C_ERR_CODE
      fi
      — 319,325 —-
      local c_fpath_pkg_name=$1

      ## result -> 0:Install process complete, 1:Install process depend error ##
      ! C_FUNC_show_and_exec “sudo dpkg -iG $c_fpath_pkg_name”
      if [ $? != 0 ]; then
      return $C_ERR_CODE
      fi

      Let me know if you are still having trouble and I’ll email you the files. I recently had to re-install and I can verify these scripts still work.
      Cheers,

  4. Mickaël says:

    Hello.

    I am a kind of newbie.
    Could you provide me with the appropriate files ?
    Thanks

    Mickaël

  5. corwin78 says:

    Thank you. I am on bussiness trip now. I will try it immediatelly after my return to home.

  6. Edwin Fine says:

    Thank you *very* much for this. I tried to rebuild the drivers from source but they have 32-bit shared libraries (in the source!) so I was flummoxed until I saw this article. I knew you could force 32-bit packages to run on 64-bit (did it with Firefox before it had 64-bit support) but didn’t realize that you could do it with printer drivers, too!

  7. Hartmut Schäfer says:

    Here is a Canon site where the drivers can be downloaded as binary builds and as source:

    http://software.canon-europe.com/products/0010757.asp

    • yellabelly says:

      Thanks, nice find. No success building on x64 Lucid. Lots of package dependencies and failing because only 32 bit support libs are provided e.g libcnbpcmcm362.so.

  8. Thanks, great post! Just installed my MP640 over network under linux in 10 minutes! 🙂

    • yellabelly says:

      Excellent, still working on Lucid 10.04 x64.
      For the scanner I needed to install getlibs and use it to install a gimp 32 bit library.
      getlibs libgimp-2.0.so.0

  9. Will Woodhull says:

    Thanks for these instructions. I had managed to get my new MP640 to print, but I was just getting confused over xsane vs scangear stuff for the scanning function.

    I’ve now got scanning by scangear under Gimp. But no xsane. Is it possible to do xsane which I think might make for better workflow since it would avoid Gimp’s overhead with loading umpteen dozen plugins? Or maybe there would not be enough benefit to be worth pursuing?

    • yellabelly says:

      I hadn’t got xsane working but check the comment and link below because with these instructions it might just be possible.

  10. E. D. says:

    Hi, I also installed the MP640 on my 64-bit system and wrote a blog entry about it. Do you want to link the PPD file which allows black-white printing (for example) for your blog readers?
    http://en.eduard-dopler.de/36/install-canon-mp640-on-ubuntu/
    I didn’t use the install script but only dpkg.

    • yellabelly says:

      Hi, thanks for excellent information I will give it a try and update later. Maybe you have xsane working with your setup?

      • E. D. says:

        My xsane 0.966 works, indeed. Also does ScanGearMP (single and over GIMP) and SimpleScan.
        As I describe in the blog entry you need to update your sane-backends via PPA.

  11. […] never used Linux, but based on this website, it is compatible with linux: link 1:https://yellabelly.wordpress.com/2010…ubuntu-x86_64/ link 2:http://ubuntuforums.org/showthread.php?t=1313945 I've owned the MP600, which is about 3 […]

  12. Rosie Gooden says:

    Informative story, bookmarked the website with hopes to read more!

  13. […] Canon MP640 working on Ubuntu x86_64 « Yellabelly’s BlogThe Canon MP640 is printer, scanner and copier with lots of useful features. It is especially good for networks … Searching around and some Linux drivers pop up on the Canon Asia site. … I installed these on the 32 bit version of Ubuntu 9.10 (Karmic Koala) and it works fine with all the features of printer and scanner. […]

  14. linux and windows…

    […]Canon MP640 working on Ubuntu x86_64 « Yellabelly’s Blog[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: