I have gotten the Canon MX870 linux drivers to work for 64-bit 11.04 Ubuntu. I had 3 problems to get through to get it to work on my system: 1) libc6/libcupsys2/libpopt0 dependency issues, 2) "package management system cannot be identified" problem, and 3) 64-bit vs. 32-bit issue.
I created a script that combined bits of different posts to fix these 3 problems in one install. Thanks to thewump and Jack Russell (whose script I borrowed heavily from).
STEPS:
1. Download the drivers from
HTML Code:
http://support-sg.canon-asia.com/contents/SG/EN/0100272302.html
2. Open a text editor window
Code:
gedit modify_ps_drivers.sh &
3. Paste the contents of the follwoing script into the gedit window
Code:
#!/bin/bash
function doFix
{
echo -n "At $(pwd), fixing $1... "
if [ -d foo ]; then
rm -rf foo
fi
mkdir foo
cd foo
ar x ../$1
# Next unpack control.
mkdir control
cd control
gzip -d -c ../control.tar.gz | tar xf -
cat control | grep -v Depends: > control2
rm control
mv control2 control
tar cf - ./ > ../control2.tar
cd ..
mv control.tar.gz control.tar.gz.old
mv control2.tar control.tar
gzip control.tar
ar r ../$1 control.tar.gz
cd ..
if [ -d foo ]; then
rm -rf foo
fi
echo " fixed."
}
function extractFilenameFromPath
{
fullPath=$1
lengthPath=${#fullPath}
i=$lengthPath
filename="$fullPath"
while [ $i -gt 0 ]; do
if [ "${fullPath:i:1}" = "/" ]; then
break
else
filename="${fullPath:i:lengthPath-i}"
fi
let i--
done
echo "$filename"
}
### MAIN
#Check for zenity first
a=$(zenity --version)
err=$?
if [ $err -ne 0 ]; then
echo "Error: zenity needs to be installed to use this script. Type sudo apt-get install zenity."; echo
exit
fi
printer=$(zenity --file-selection --title "Select printer driver tar.gz file")
scanner=$(zenity --file-selection --title "Select scanner driver tar.gz file")
tar xzf $printer
tar xzf $scanner
printer=$(extractFilenameFromPath $printer)
scanner=$(extractFilenameFromPath $scanner)
printerLen=${#printer}
scannerLen=${#scanner}
printer=${printer:0:printerLen-7}
scanner=${scanner:0:scannerLen-7}
printerLs=$(ls $printer/packages)
printerDeb1=$(echo "$printerLs" | head -n 1)
printerDeb2=$(echo "$printerLs" | head -n 2 | tail -n 1)
scannerLs=$(ls $scanner/packages)
scannerDeb1=$(echo "$scannerLs" | head -n 1)
scannerDeb2=$(echo "$scannerLs" | head -n 2 | tail -n 1)
#echo $printer, $printerDeb1, $printerDeb2
#echo $scanner, $scannerDeb1, $scannerDeb2
cd $printer/packages
doFix $printerDeb1
doFix $printerDeb2
cd ..
#Fix rpm response so it doesn't get the wrong version
sed -i 's/c_system_rpm=$?/c_system_rpm=1/g' install.sh
#Add '--force-architecture' to install command for 64-bit
sed -i 's/sudo dpkg -iG/sudo dpkg --force-architecture -iG/g' install.sh
cd ..
cd $scanner/packages
doFix $scannerDeb1
doFix $scannerDeb2
cd ..
#Fix rpm response so it doesn't get the wrong version
sed -i 's/c_system_rpm=$?/c_system_rpm=1/g' install.sh
#Add '--force-architecture' to install command for 64-bit
sed -i 's/sudo dpkg -iG/sudo dpkg --force-architecture -iG/g' install.sh
cd ..
echo
echo "Run the install.sh script in $printer to install printer driver, and the install.sh script in $scanner to install the scanner driver."
4. Save the file and quit gedit
5. Make sure the file is executable
Code:
chmod a+x modify_ps_drivers.sh
6. Run the script above which will modify the driver install scripts
Code:
./modify_ps_drivers.sh
7. Install the printer driver
Code:
cnijfilter-mx870series-3.30-1-i386-deb/install.sh
8. Install the scanner driver
Code:
scangearmp-mx870series-1.50-1-i386-deb/install.sh
Optional: create a shortcut icon in start/unity menu for the canon scanner software, which gets installed into /usr/bin/scangearmp
Bookmarks