I downloaded the package from
untar the package using
cd into the packages directory
tar xvf cnijfilter-mp640series-3.20-1-i386-deb.tar.gz
Then using videbcontrol remove all the dependencies from both deb files by deleting everything after
make sure you have similar packages installed though I am pretty sure everything will be installed on a default Ubuntu install.
then install the modified packages using
you may have to clean up some files with incorrect permissions check your /var/log/cups/error_log change any file reported with incorrect permissions to match other files in the folder. In particular change user from your user to root using
sudo dpkg -i sudo dpkg -i cnijfilter-common_3.20-1_i386.modfied.deb cnijfilter-mp640series_3.20-1_i386.modfied.deb
You may then be able to install your printer using the gui or web interface http://localhost:631
chown root:root *file*
However I could not so I used
replace the cnijnet... with the output of cnijnetprn
cnijnetprn --search auto
sudo /usr/sbin/lpadmin -p canon640 -m canonmp640.ppd -v cnijnet:/00-1E-8F-B8-DA-33
I then found more files with incorrect permissions looking at printers in the web interface, fix them with the steps above and again restart cups and resume the printer.
I hope that helps someone sorry it is not all that straight forward I did not exactly document the steps I took so I someone wants to clean up this guide and repost that would help more people. Now if only canon would update their packages to install more easily.