As mentioned in my last post, the wifes PC packed up and I’ve temporarily set up an account on our Grand-Daughters PC for her until we get her another PC ( no doubt running windows) but meantime she’s stuck with Linux like it or not, so far she’s had no problems using Peppermint 3 and i would like it to stay that way if possible, the only problem I have is I can’t get her scanner to work ,It’s a Brother DCP-120C Printer/Scanner, the printer works fine but sane doesn’t recognise the scanner (no scanners detected) I downloaded and installed the brscan2 driver for the Brother website here Brother support website and the scan-key-tool, but no luck, so I don’t know where to go from here
Any help would be much appreciated
many thanks
Graeme
EDIT
Immediately after writing this post i noticed I had updates waiting to be installed and and this error showed up
E: brscan2: subprocess installed post-removal script returned error exit status 1
How is the printer/scanner connected?
If it is a network printer then have you seen this:
brsaneconfig2 -a name=(name your device) model=(model name) ip=xx.xx.xx.xx
Example:
brsaneconfig2 -a name=SCANNER model=DCP-540CN ip=192.168.3.3
family@Linux2 ~ $ brscaneconfig2 -a name=SCANNER model=DCP-120C ip=192.168.2.17
brsaneconfig2: command not found
family@Linux2 ~ $
How is the printer/scanner connected?
It’s connected to this PC via USB and the printer is shared on the network.
I tried removing brscan2 but it refuses to uninstall because I have updates but when I try to run them i get a box popping up saying “the following package will be removed-brscan2” then if I click ok I get a box with this message
E: brscan2: subprocess installed post-removal script returned error exit status 1
then the update icon goes back to blue and no updates are installed .
This is the terminal output I get when I try to remove brscan2
family@Linux2 ~ $ sudo apt-get remove brscan2
[sudo] password for family:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
v4l-utils libwxgtk2.8-0 libexempi3 libwxsqlite3-2.8-0 mythes-en-au
libwxbase2.8-0 openoffice.org-hyphenation hyphen-en-us libido3-0.1-0
libetpan15 libgldi3
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
brscan2
0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 258001 files and directories currently installed.)
Removing brscan2 ...
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ALL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/AL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/models2': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane': No such file or directory
rmdir: failed to remove `/usr/local/Brother': No such file or directory
dpkg: error processing brscan2 (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
brscan2
E: Sub-process /usr/bin/dpkg returned an error code (1)
family@Linux2 ~
$
EDIT
Since typing this post I’ve realised I cannot install any software either, when I try I get the same error as above
E: brscan2: subprocess installed post-removal script returned error exit status 1
First the error relating to brsaneconfig2 could be down to miss spelling. (I have done that too) or user permissions, try it with sudo.
The removal error could be down to bug in removal script. (see here)
Try fudging it:
Change directory to the dpkg info folder:
cd /var/lib/dpkg/info
Locate all brscan2 files:
ls -l | grep brscan2
Then open the file ending with the suffix “.postrm” as root.
sudo gedit brscan2.postrm
Then locate all matches of this pattern from within the file:
“exit”
if exists then change to “exit 0”
if not then add it to the end of the file, save and exit.
Now try to uninstall brscan2
After changes to dpkg file this is what happens when I try to uninstall
family@Linux2 /var/lib/dpkg/info $ sudo apt-get remove brscan2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
v4l-utils libwxgtk2.8-0 libexempi3 libwxsqlite3-2.8-0 mythes-en-au libwxbase2.8-0 openoffice.org-hyphenation hyphen-en-us libido3-0.1-0 libetpan15 libgldi3
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
brscan2
0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 258001 files and directories currently installed.)
Removing brscan2 ...
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ALL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/AL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/models2': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane': No such file or directory
rmdir: failed to remove `/usr/local/Brother': No such file or directory
/var/lib/dpkg/info/brscan2.postrm: 9: /var/lib/dpkg/info/brscan2.postrm: exit0: not found
dpkg: error processing brscan2 (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
brscan2
E: Sub-process /usr/bin/dpkg returned an error code (1)
family@Linux2 /var/lib/dpkg/info $
Ok I corrected the config typo from exit0 to exit 0 (sorry about that) and ran your instructions again
family@Linux2 ~ $ sudo gedit brscan2.postrm
[sudo] password for family:
Sorry, try again.
[sudo] password for family:
Sorry, try again.
[sudo] password for family:
family@Linux2 ~ $ clear
family@Linux2 ~ $ cd /var/lib/dpkg/info
family@Linux2 /var/lib/dpkg/info $ ls -l | grep brscan2
-rw-r--r-- 1 root root 0 Dec 2 2009 brscan2.conffiles
-rw-r--r-- 1 root root 16 Jul 4 11:36 brscan2.list
-rwxr-xr-x 1 root root 81 Dec 2 2009 brscan2.postinst
-rwxr-xr-x 1 root root 430 Jul 4 11:35 brscan2.postrm
-rwxr-xr-x 1 root root 430 Jul 4 11:34 brscan2.postrm~
-rwxr-xr-x 1 root root 81 Dec 2 2009 brscan2.prerm
family@Linux2 /var/lib/dpkg/info $ sudo gedit brscan2.postrm
family@Linux2 /var/lib/dpkg/info $ sudo apt-get remove brscan2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
v4l-utils libwxgtk2.8-0 libexempi3 libwxsqlite3-2.8-0 mythes-en-au libwxbase2.8-0 openoffice.org-hyphenation hyphen-en-us libido3-0.1-0 libetpan15 libgldi3
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
brscan2
0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 258001 files and directories currently installed.)
Removing brscan2 ...
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/ALL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData/AL': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/GrayCmData': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane/models2': No such file or directory
rmdir: failed to remove `/usr/local/Brother/sane': No such file or directory
rmdir: failed to remove `/usr/local/Brother': No such file or directory
family@Linux2 /var/lib/dpkg/info $
EDIT
I’m not sure if that means it’s uninstalled but it must have something because I’m now able to install my updates without any errors, the question now is should I re-install brscan2 or is there something else i need to do to get the scanner recognized ?
Ok ignore my last post I got it working by adding the scanner to the /lib/udev/rules.d/40-libsane.rules file. by following these instructions from the Brother website