Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
1  
So, it suddenly dawned on me that the permission denied thing may be related to the 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, while defaults implies exec, users instead implies noexec - as the latter is last, it will override the previous one. Changed it to defaults only and all is now ponies and sunshine with apt-get. Posting my own answer in case it helps anyone else out there. –  Marco Jan 23 '13 at 8:15
    
btw - sorry about formatting, but there's this completely idiotic thing about 'reputation' points that only allows me to post a comment. –  Marco Jan 23 '13 at 8:16
1  
you can always edit your own question. –  Web-E Jan 23 '13 at 8:24
1  
... and you can answer your own question! –  guntbert Jan 23 '13 at 13:53
    
duh! about editing my own question (done now, thanks!) -- but, no, you can't answer your own for 8 hours, apparently, if you don't have enough reputation points –  Marco Jan 24 '13 at 16:31
add comment

1 Answer

OP posted:

So, it suddenly dawned on me that the permission denied thing may be related to the 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, while defaults implies exec, users instead implies noexec - as the latter is last, it will override the previous one.

Changed it to defaults only and all is now ponies and sunshine with apt-get. Leaving it here in case it helps anyone else out there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.