I have recently installed 12.04 and all seemed to be well, until today when I got a series of errors when trying to run
$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: visual-regexp The following packages will be upgraded: dkms firefox firefox-globalmenu firefox-gnome-support firefox-locale-en gnome-games-data gnome-sudoku gnomine google-chrome-stable libglu1-mesa libglu1-mesa:i386 libmysqlclient18:i386 mahjongg mysql-common tk8.5 vino 16 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 11 not fully installed or removed. Need to get 0 B/67.4 MB of archives. After this operation, 2,890 kB of additional disk space will be used. Do you want to continue [Y/n]? (Reading database ... dpkg: warning: files list file for package `tk8.5' missing, assuming package has no files currently installed. (Reading database ... 235237 files and directories currently installed.) Removing visual-regexp ... dpkg (subprocess): unable to execute installed post-removal script (/var/lib/dpkg/info/visual-regexp.postrm): Permission denied dpkg: error processing visual-regexp (--remove): subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing: visual-regexp E: Sub-process /usr/bin/dpkg returned an error code (1)
It all seems to have started with this infamous error:
dpkg: warning: files list file for package `tk8.5' missing, assuming package has no files currently installed.
which was probably originated by my installing
visual-regexp - which I'm now unable to remove.
I've tried several fixes, including:
sudo apt-get -f install sudo dpkg --configure -a sudo apt-get --fix-missing upgrade
and others, trying to follow this answer, but to no avail.
Also, I'm not quite clear what the problem may be with the
permission, as I'm obviously running apt-get as
$ ll /var/lib/dpkg/info/visual-regexp.postrm -rwxr-xr-x 1 root root 160 Jun 24 2011 /var/lib/dpkg/info/visual-regexp.postrm
Also, note the
11 not fully installed or removed. which was due to previous failures in
apt-get upgrade: is there any way to recover from this?
Thanks in advance, Marco.