Ubuntu

Brother mcf 8840d package uninstall

Asked by Thomas Galletly on 2012-06-18

My printer will not print.
When I run computer janitor it brings up the below program to be removed.

mcf8840dlpr:i386
Package will be removed
Size: 0B

Package is no longer supported: It is no longer in the Package archive.

Brother print driver

Cleanup fails with the message; System clean up could not complete. Be sure no other package manager such as Synaptic
or Update Manager is running.
 It then reports a system problem and sends it off.

How do I remove the package and install a working driver?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2012-06-26
Last query:
2012-06-26
Last reply:
2012-06-26

Can you give the output of:

sudo apt-get --purge remove mcf8840dlpr:i386; lsb_release -a

Thanks

Thomas Galletly (desertdog62) said : #2

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mcf8840dlpr:i386
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise

dpkg -l | grep mcf

What is output please?

Thomas Galletly (desertdog62) said : #4

No output received

Thomas Galletly (desertdog62) said : #5

desertdog62@desertdog62-System-Product-Name:~$ mkdir ~/brotherdriver
mkdir: cannot create directory `/home/desertdog62/brotherdriver': File exists
desertdog62@desertdog62-System-Product-Name:~$ cd ~/brotherdriver
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ wget http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
--2012-06-18 09:56:44-- http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving www.brother.com (www.brother.com)... 63.80.242.49, 63.80.242.27
Connecting to www.brother.com (www.brother.com)|63.80.242.49|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb [following]
--2012-06-18 09:56:44-- http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving pub.brother.com (pub.brother.com)... 63.80.242.26, 63.80.242.49
Reusing existing connection to www.brother.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 28906 (28K) [text/plain]
Saving to: `mfc8840dlpr-1.1.2-1.i386.deb.1'

100%[======================================>] 28,906 --.-K/s in 0.1s

2012-06-18 09:56:45 (194 KB/s) - `mfc8840dlpr-1.1.2-1.i386.deb.1' saved [28906/28906]

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb
[sudo] password for desertdog62:
Sorry, try again.
[sudo] password for desertdog62:
Sorry, try again.
[sudo] password for desertdog62:
Selecting previously unselected package mfc8840dlpr:i386.
(Reading database ... 235783 files and directories currently installed.)
Preparing to replace mfc8840dlpr:i386 1.1.2-1 (using mfc8840dlpr-1.1.2-1.i386.deb) ...
Unpacking replacement mfc8840dlpr:i386 ...
/var/lib/dpkg/info/mfc8840dlpr.postrm: 3: /var/lib/dpkg/info/mfc8840dlpr.postrm: /etc/init.d/lpd: not found
dpkg: warning: subprocess old post-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/postrm: 3: /var/lib/dpkg/tmp.ci/postrm: /etc/init.d/lpd: not found
dpkg: error processing mfc8840dlpr-1.1.2-1.i386.deb (--install):
 subprocess new post-removal script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 3: /var/lib/dpkg/tmp.ci/postrm: /etc/init.d/lpd: not found
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 127
Errors were encountered while processing:
 mfc8840dlpr-1.1.2-1.i386.deb

Manfred Hampl (m-hampl) said : #6

It seems you missed an important step in the installation instructions of the Brother printer driver:
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/before.html#003

Open a terminal and issue the command

sudo ln -s /etc/init.d/cups /etc/init.d/lpd

and then try the "sudo dpkg -i ..." command again

Thomas Galletly (desertdog62) said : #7

desertdog62@desertdog62-System-Product-Name:~$ ln -s /etc/init.d/cups /etc/init.d/lpd
ln: failed to create symbolic link `/etc/init.d/lpd': File exists
desertdog62@desertdog62-System-Product-Name:~$ mkdir /var/spool/lpd
mkdir: cannot create directory `/var/spool/lpd': Permission denied
desertdog62@desertdog62-System-Product-Name:~$ lppasswd -g sys -a root
lppasswd: Only root can add or delete passwords.
desertdog62@desertdog62-System-Product-Name:~$ sudo aa-complain cupsd
[sudo] password for desertdog62:
Setting /etc/apparmor.d/usr.sbin.cupsd to complain mode.
desertdog62@desertdog62-System-Product-Name:~$ sudo mkdir /usr/share/cups/model
mkdir: cannot create directory `/usr/share/cups/model': File exists
desertdog62@desertdog62-System-Product-Name:~$ ln -s /etc/init.d/cups /etc/init.d/lpd
ln: failed to create symbolic link `/etc/init.d/lpd': File exists
desertdog62@desertdog62-System-Product-Name:~$ mkdir /var/spool/lpd
mkdir: cannot create directory `/var/spool/lpd': Permission denied
desertdog62@desertdog62-System-Product-Name:~$ ia32-libs or lib32stdc++
ia32-libs: command not found

Manfred Hampl (m-hampl) said : #8

The messages from your system are contradictory.

The installation complains with
"/etc/init.d/lpd: not found"

And the attempt to repair it with the "sudo ln ..." command comes back with
"`/etc/init.d/lpd': File exists"

Please open a terminal and issue the commands
ls -l /etc/init.d/lpd
file /etc/init.d/lpd
cat /var/lib/dpkg/info/mfc8840dlpr.postrm

and report the results.

By the way, you tried to execute some commands from http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/before.html that are for different Linux variants. E.g. the lppasswd command is required for openSUSE, but not for Ubuntu! And you ommitted the sudo prefix in some of the commands.

Thomas Galletly (desertdog62) said : #9

desertdog62@desertdog62-System-Product-Name:~$ ls -l /etc/init.d/lpd
lrwxrwxrwx 1 root root 16 Jun 20 07:39 /etc/init.d/lpd -> /etc/init.d/cups
desertdog62@desertdog62-System-Product-Name:~$ file /etc/init.d/lpd
/etc/init.d/lpd: symbolic link to `/etc/init.d/cups'
desertdog62@desertdog62-System-Product-Name:~$ cat /var/lib/dpkg/info/mfc8840dlpr.postrm
#!/bin/sh
# ESP Package Manager v3.5.1
/etc/init.d/lpd restart

I am unable to do any updates or install any packages. I continue to get system errors that are being reported and sent out.

Manfred Hampl (m-hampl) said : #10

So apparently the link for /etc/init.s/lpd is there.

If you try again with

cd ~/brotherdriver
sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb

what is the output?

Thomas Galletly (desertdog62) said : #11

desertdog62@desertdog62-System-Product-Name:~$ cd ~/brotherdriver
bash: cd: /home/desertdog62/brotherdriver: No such file or directory
desertdog62@desertdog62-System-Product-Name:~$ sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb
[sudo] password for desertdog62:
dpkg: error processing mfc8840dlpr-1.1.2-1.i386.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 mfc8840dlpr-1.1.2-1.i386.deb
desertdog62@desertdog62-System-Product-Name:~$

Manfred Hampl (m-hampl) said : #12

Apparently you already deleted the file and directory, so you have to donwload again:

mkdir ~/brotherdriver
cd ~/brotherdriver
wget http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb

Thomas Galletly (desertdog62) said : #13

mkdir ~/brotherdriver
cd ~/brotherdriver
wget http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb

desertdog62@desertdog62-System-Product-Name:~$ mkdir ~/brotherdriver
desertdog62@desertdog62-System-Product-Name:~$ cd ~/brotherdriver
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ wget http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
--2012-06-22 06:14:42-- http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving www.brother.com (www.brother.com)... 63.80.242.27, 63.80.242.49
Connecting to www.brother.com (www.brother.com)|63.80.242.27|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb [following]
--2012-06-22 06:14:49-- http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving pub.brother.com (pub.brother.com)... 63.80.242.51, 63.80.242.49
Connecting to pub.brother.com (pub.brother.com)|63.80.242.51|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28906 (28K) [text/plain]
Saving to: `mfc8840dlpr-1.1.2-1.i386.deb'

100%[======================================>] 28,906 87.2K/s in 0.3s

2012-06-22 06:14:50 (87.2 KB/s) - `mfc8840dlpr-1.1.2-1.i386.deb' saved [28906/28906]

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb
[sudo] password for desertdog62:
Sorry, try again.
[sudo] password for desertdog62:
Sorry, try again.
[sudo] password for desertdog62:
Selecting previously unselected package mfc8840dlpr:i386.
(Reading database ... 235783 files and directories currently installed.)
Preparing to replace mfc8840dlpr:i386 1.1.2-1 (using mfc8840dlpr-1.1.2-1.i386.deb) ...
Unpacking replacement mfc8840dlpr:i386 ...
initctl: Unknown job: lpd
Setting up mfc8840dlpr:i386 (1.1.2-1) ...
mkdir: cannot create directory `/var/spool/lpd/MFC8840D': No such file or directory
chown: cannot access `/var/spool/lpd/MFC8840D': No such file or directory
chgrp: cannot access `/var/spool/lpd/MFC8840D': No such file or directory
chmod: cannot access `/var/spool/lpd/MFC8840D': No such file or directory
initctl: Unknown job: lpd
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$

Try:

sudo mkdir -p /var/spool/lpd/MFC8840D

Then retry

Thomas Galletly (desertdog62) said : #15

desertdog62@desertdog62-System-Product-Name:~$ sudo mkdir -p /var/spool/lpd/MFC8840D
desertdog62@desertdog62-System-Product-Name:~$ mkdir ~/brotherdriver
mkdir: cannot create directory `/home/desertdog62/brotherdriver': File exists
desertdog62@desertdog62-System-Product-Name:~$ cd ~/brotherdriver
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ wget http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
--2012-06-22 07:29:55-- http://www.brother.com/pub/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving www.brother.com (www.brother.com)... 63.80.242.27, 63.80.242.49
Connecting to www.brother.com (www.brother.com)|63.80.242.27|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb [following]
--2012-06-22 07:29:55-- http://pub.brother.com/pub/com/bsc/linux/dlf/mfc8840dlpr-1.1.2-1.i386.deb
Resolving pub.brother.com (pub.brother.com)... 63.80.242.51, 63.80.242.26
Connecting to pub.brother.com (pub.brother.com)|63.80.242.51|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28906 (28K) [text/plain]
Saving to: `mfc8840dlpr-1.1.2-1.i386.deb.2'

100%[======================================>] 28,906 --.-K/s in 0.1s

2012-06-22 07:29:56 (198 KB/s) - `mfc8840dlpr-1.1.2-1.i386.deb.2' saved [28906/28906]

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ sudo dpkg -i mfc8840dlpr-1.1.2-1.i386.deb
(Reading database ... 235795 files and directories currently installed.)
Preparing to replace mfc8840dlpr:i386 1.1.2-1 (using mfc8840dlpr-1.1.2-1.i386.deb) ...
Unpacking replacement mfc8840dlpr:i386 ...
initctl: Unknown job: lpd
Setting up mfc8840dlpr:i386 (1.1.2-1) ...
initctl: Unknown job: lpd

Thomas Galletly (desertdog62) said : #16

An error occured. please run Package Manager from the right click menu or apt- get into a terminal to see what is wrong. The error message was: "Unknown Error: "<type exceptions.SystemError">"(E:The package cupswrappermfc8840d:i386 needs to be reinstalled, but I can't find an archive for it.)" This usually means that your installed packages have unmet dependencies.

Best Manfred Hampl (m-hampl) said : #17

The package that you need is available for download from the brother web pages.

Apparently theer was some misinterpretation of the information on the brother driver download pages:
There are two different environments for printing - lpr and cups. You need one. You seem to have cups installed on your system, so you have to add the cupswrapper driver to activate the printer, and not the lpr version which was used in most of the previous commands.

Try the following commands, one after the other:

mkdir ~/brotherdriver
cd ~/brotherdriver
wget -c http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC8840D-1.0.2-1.i386.deb
sudo dpkg -P mfc8840dlpr --force-remove-reinstreq
sudo dpkg -i cupswrapperMFC8840D-1.0.2-1.i386.deb
dpkg -l | grep 8840
wget -c http://www.brother.com/pub/bsc/linux/dlf/BR8840_2_GPL.ppd.gz
gunzip BR8840_2_GPL.ppd
sudo cp BR8840_2_GPL.ppd /usr/share/ppd
sudo chmod 644 /usr/share/ppd/BR8840_2_GPL.ppd
sudo chown root:root /usr/share/ppd/BR8840_2_GPL.ppd
sudo /etc/init.d/cupsys restart

Please select ALL output and copy/paste it into a new message of theis question thread.

Follow the steps in http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn1c.html below the heading "Step 5a." to configure the printer on the CUPS web interface.
5a-1. Open a web browser and go to "http://localhost:631/admin".
5a-2. Click "Add Printer" and set the following parameters: Name/Device/Manufacturer/Model

Manfred Hampl (m-hampl) said : #18

Ups, a typo error:
The command in line number 8 must read

gunzip BR8840_2_GPL.ppd.gz

Thomas Galletly (desertdog62) said : #19

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ mkdir ~/brotherdriver
mkdir: cannot create directory `/home/desertdog62/brotherdriver': File exists
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ cd ~/brotherdriver
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ wget -c http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC8840D-1.0.2-1.i386.deb
--2012-06-26 08:04:46-- http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC8840D-1.0.2-1.i386.deb
Resolving www.brother.com (www.brother.com)... 80.67.74.143, 80.67.74.158
Connecting to www.brother.com (www.brother.com)|80.67.74.143|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperMFC8840D-1.0.2-1.i386.deb [following]
--2012-06-26 08:04:48-- http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperMFC8840D-1.0.2-1.i386.deb
Resolving pub.brother.com (pub.brother.com)... 80.67.74.152, 80.67.74.150
Connecting to pub.brother.com (pub.brother.com)|80.67.74.152|:80... connected.
HTTP request sent, awaiting response... 200 OK

    The file is already fully retrieved; nothing to do.

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ sudo dpkg -P mfc8840dlpr --force-remove-reinstreq
dpkg: warning: there's no installed package matching mfc8840dlpr
dpkg: error: package name in specifier '--force-remove-reinstreq' is illegal: must start with an alphanumeric character
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ sudo dpkg -i cupswrapperMFC8840D-1.0.2-1.i386.deb
(Reading database ... 235795 files and directories currently installed.)
Preparing to replace cupswrappermfc8840d:i386 1.0.2-1 (using cupswrapperMFC8840D-1.0.2-1.i386.deb) ...
cups stop/waiting
cups start/running, process 3319
Unpacking replacement cupswrappermfc8840d:i386 ...
Setting up cupswrappermfc8840d:i386 (1.0.2-1) ...
rm -f /usr/lib/cups/filter/brlpdwrapperMFC8840D
initctl: Unknown job: lpd
cups stop/waiting
cups start/running, process 3392
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ dpkg -l | grep 8840ii cupswrappermfc8840d:i386 1.0.2-1 Brother MFC8840D CUPS wrapper driver
ii mfc8840dlpr:i386 1.1.2-1 Brother lpr Printer Definitions
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ wget -c http://www.brother.com/pub/bsc/linux/dlf/BR8840_2_GPL.ppd.gz
--2012-06-26 08:04:56-- http://www.brother.com/pub/bsc/linux/dlf/BR8840_2_GPL.ppd.gz
Resolving www.brother.com (www.brother.com)... 80.67.74.143, 80.67.74.158
Connecting to www.brother.com (www.brother.com)|80.67.74.143|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://pub.brother.com/pub/com/bsc/linux/dlf/BR8840_2_GPL.ppd.gz [following]
--2012-06-26 08:04:56-- http://pub.brother.com/pub/com/bsc/linux/dlf/BR8840_2_GPL.ppd.gz
Resolving pub.brother.com (pub.brother.com)... 80.67.74.152, 80.67.74.150
Connecting to pub.brother.com (pub.brother.com)|80.67.74.152|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4616 (4.5K) [text/plain]
Saving to: `BR8840_2_GPL.ppd.gz'

100%[======================================>] 4,616 --.-K/s in 0.005s

2012-06-26 08:04:57 (914 KB/s) - `BR8840_2_GPL.ppd.gz' saved [4616/4616]

desertdog62@desertdog62-System-Product-Name:~/brotherdriver$ gunzip BR8840_2_GPL.ppd.gz
gzip: BR8840_2_GPL.ppd already exists; do you wish to overwrite (y or n)? y
 not overwritten
desertdog62@desertdog62-System-Product-Name:~/brotherdriver$

Thomas Galletly (desertdog62) said : #20

After re-running the command the problem is mostly fixed. I am able to run updates and computer janitor which cleaned up several outstanding problems. So, I believe this can be closed. Thank everyone for all the help. I really appreciate it.

Thomas Galletly (desertdog62) said : #21

Thanks Manfred Hampl, that solved my question.

Manfred Hampl (m-hampl) said : #22

I am happy to read that the package management system is operating again.

Now there is the question if you can print and scan with your device.
If you need that functionality and if you are unable to activate it and need help, please open a new question for that.

And - as it is a duplicate to this question - please set also question https://answers.launchpad.net/ubuntu/+source/software-center/+question/198487 to solved.