Bug appears to be related to Sophos Anti-Virus (SAV). I removed SAV, and
apt-get -f install completed OK. Terminal output below.
SAV was using fanotify for on-access detection.
Caveats:
1. I have two machines affected by this, I've only tried this on one so far.
2. This is not a simple causal relationship: I have other machines with SAV
installed using fanotify that did not show this problem.
I will report this to Sophos.
Terminal output:
root@finwhale:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libreoffice-common
Suggested packages:
libreoffice-style-crystal libreoffice-style-hicontrast
libreoffice-style-oxygen libreoffice-style-sifr libreoffice-style-tango
The following NEW packages will be installed:
libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
24 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 76.1 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 201455 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb ...
Unpacking libreoffice-common (1:4.2.8-0ubuntu2) ...
dpkg: error processing archive
/var/cache/apt/archives/libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb
(--unpack):
unable to open
'/usr/lib/libreoffice/share/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl.dpkg-new':
Operation not permitted
rmdir: failed to remove ‘/var/lib/libreoffice/share/prereg/’: No such file or
directory
rmdir: failed to remove ‘/var/lib/libreoffice/share/’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice/program/’: No such file or
directory
rmdir: failed to remove ‘/var/lib/libreoffice’: No such file or directory
rmdir: failed to remove ‘/var/lib/libreoffice’: No such file or directory
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for gnome-icon-theme (3.10.0-0ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing:
/var/cache/apt/archives/libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@finwhale:~# cd /opt/sophos-av
root@finwhale:/opt/sophos-av# ls
bin engine include lib32 mcs share tmp uninstall.sh var
doc etc lib logrms talpa uncdownload update
root@finwhale:/opt/sophos-av# cd
root@finwhale:~# /opt/sophos-av/uninstall.sh
Uninstalling Sophos Anti-Virus.
WARNING: Sophos Anti-Virus still running.
WARNING: Sophos Anti-Virus GUI daemon still running.
Do you want to stop Sophos Anti-Virus? Yes(Y)/No(N) [N]
> Y
Stopping Sophos Anti-Virus.
Stopping Sophos Anti-Virus GUI daemon.
Sophos Anti-Virus has been uninstalled.
root@finwhale:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libreoffice-common
Suggested packages:
libreoffice-style-crystal libreoffice-style-hicontrast
libreoffice-style-oxygen libreoffice-style-sifr libreoffice-style-tango
The following NEW packages will be installed:
libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
24 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 76.1 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 201455 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a4.2.8-0ubuntu2_all.deb ...
Unpacking libreoffice-common (1:4.2.8-0ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for gnome-icon-theme (3.10.0-0ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up fonts-dejavu (2.34-1ubuntu1) ...
Setting up fonts-sil-gentium (20081126:1.02-13) ...
Setting up fonts-sil-gentium-basic (1.1-7) ...
Setting up libservlet3.0-java (7.0.52-1ubuntu0.1) ...
Setting up libhsqldb1.8.0-java (1.8.0.10+dfsg-3ubuntu1) ...
Setting up libreoffice-common (1:4.2.8-0ubuntu2) ...
Setting up