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 apt-get upgrade
:
$ 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 sudo
:
$ 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.
noexec
option in /etc/fstab (I'm mounting/var
on a different disk than/
). Turns out I'd used the following mount option: UUID=b5ae50cf-58e6-46f8-8313-6c1492dcc8ad /var ext4 defaults,users 0 0 and, whiledefaults
impliesexec
,users
instead impliesnoexec
- as the latter is last, it will override the previous one. Changed it todefaults
only and all is now ponies and sunshine withapt-get
. Posting my own answer in case it helps anyone else out there.