Re: [Hampshire] removing a broken pakage.

Top Page
Author: David Ramsden
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] removing a broken pakage.

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x56a68100.hantslug.org.uk.4881': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Thu Mar 8 00:14:45 2007 GMT
gpg: using DSA key B15F69BD3454B217
gpg: Can't check signature: No public key
Mike Burrows wrote:
> Hello Folks.
>
> As part of troubleshooting my usb printer problem, I thought I would
> reinstall the lpr driver and cups wrapper that Brother provides on their
> site. I'm not sure the sequence of events but the result is that the
> printer is no longer displayed in CUPS and this is what I get when I try
> and install the two drivers:
>
> marvin:/home/testermike/brother# dpkg -i mfc240clpr-1.0.0-9.i386.deb
> Selecting previously deselected package mfc240clpr.
> (Reading database ... 95213 files and directories currently installed.)
> Unpacking mfc240clpr (from mfc240clpr-1.0.0-9.i386.deb) ...
> Setting up mfc240clpr (1.0.0-9) ...
> mkdir: cannot create directory `/var/spool/lpd/mfc240c': No such file or
> directory
> chown: cannot access `/var/spool/lpd/mfc240c': No such file or directory
> chgrp: cannot access `/var/spool/lpd/mfc240c': No such file or directory
> chmod: cannot access `/var/spool/lpd/mfc240c': No such file or directory
>


Did the above actually install though? If it didn't then try as root:
    mkdir -p /var/spool/lpd/mfc240c


After this, try installing the mfc240clpr-1.0.0-9.i386.deb package.

The above is probably failing because it's assuming the directory
structure /var/spool/lpd already exists and it's trying to create the
mfc240c directory inside it. So using "mkdir -p" creates all the parent
directories as well.

>
> marvin:/home/testermike/brother# dpkg -i --force-all
> mfc240ccupswrapper-1.0.0-9.i386.deb
> (Reading database ... 95228 files and directories currently installed.)
> Preparing to replace mfc240ccupswrapper 1.0.0-9 (using
> mfc240ccupswrapper-1.0.0-9.i386.deb) ...
> /var/lib/dpkg/info/mfc240ccupswrapper.prerm: line 3:
> /usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c: No
> such file or directory
> dpkg: warning - old pre-removal script returned error exit status 127
> dpkg - trying script from the new package instead ...
> /var/lib/dpkg/tmp.ci/prerm: line 3:
> /usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c: No
> such fileor directory
> dpkg: error processing mfc240ccupswrapper-1.0.0-9.i386.deb (--install):
> subprocess new pre-removal script returned error exit status 127
> /var/lib/dpkg/info/mfc240ccupswrapper.postinst: line 3:
> /usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c: No
> such file or directory
> dpkg: error while cleaning up:
> subprocess post-installation script returned error exit status 127
> Errors were encountered while processing:
> mfc240ccupswrapper-1.0.0-9.i386.deb
> marvin:/home/testermike/brother#
> brother advise that the lpr driver be installed before the wrapper.
>


If the driver didn't install then this could by why the wrapper isn't
installing cleanly?

> I think what I should do is remove all files of the two packages but do
> not know where to start.
>


Try:

export COLUMNS=200; dpkg -l | grep mfc240

This'll show you all packages installed with "mfc240" in their name.
Then you can use "apt-get remove", "aptitude remove" or "dpkg -r" to
remove the package.. in most cases. Unless it's really broken in which
case paste the results when you try removing.

Regards,
David.
-- 
 .''`.     David Ramsden
: :'  :    http://0wned.it/
`. `'`     PGP key ID: 3454B217 on wwwkeys.eu.pgp.net
  `-  Debian - Because it works (tm).