0

I can't do anything with apt-get. As root, I ran "apt-get clean" (finished quickly and silently). Then "apt-get update"- which, since I am running an old version (13.?) can't find the repositories and fails. It used to fail anyway because of this error, which happens when I try to install or remove a package:

After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 386770 files and directories currently installed.)
Removing brscan2 (0.2.5-1) ...
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 package brscan2 (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 brscan2
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried messing with "brscan2" manually, but haven't been able to fix this.

I am thinking of just putting in a 14.04 or 16.? lts CD and trying to upgrade. I bet that would fail too. So- what to do?

Thanks in advance,

Bill

Pilot6
  • 92,041
lunix
  • 65

2 Answers2

1

Solution

I recreated the folders using:

 sudo mkdir -pv /usr/local/Brother/sane/models2
    mkdir: created directory '/usr/local/Brother'
    mkdir: created directory '/usr/local/Brother/sane'
    mkdir: created directory '/usr/local/Brother/sane/models2'`

sudo mkdir -pv /usr/local/Brother/sane/GrayCmData/ALL mkdir: created directory '/usr/local/Brother/sane/GrayCmData' mkdir: created directory '/usr/local/Brother/sane/GrayCmData/ALL'`

sudo mkdir -pv /usr/local/Brother/sane/GrayCmData/AL mkdir: created directory '/usr/local/Brother/sane/GrayCmData/AL'`

and then I could cleanly remove the package:

sudo dpkg -P brscan2

1

Please be more verbose - which command did you try?

You can try:

sudo apt-get -f install

and

sudo dpkg --configure -a

I would use comments if I was allowed to

cybea
  • 89