I'm using Ubuntu 19.04, and i'm constantly getting errors where sudo apt upgrade malfunctions, and when i run sudo apt install --fix-broken, i get this output:

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
The following NEW packages will be installed
0 to upgrade, 1 to newly install, 0 to remove and 10 not to upgrade.
19 not fully installed or removed.
Need to get 0 B/33.2 MB of archives.
After this operation, 86.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 428397 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb ...
Unpacking libreoffice-common (1:6.2.3-0ubuntu0.19.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb (--unpack):
 unable to open '/usr/share/libreoffice/share/config/images_helpimg.zip.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
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • 1
    Have you made any changes to ownerships, permissions, or sudo? – user535733 May 16 at 20:55
  • Not to my knowledge – KRACK_BIT May 16 at 21:07

Check what permissions you are being given with sudo:

sudo -l

That should give you the lines:

User root may run the following commands on xyzzy:
    (ALL : ALL) ALL

If you don't get that (don't have full permission), try running apt by naming root:

sudo -g root apt ...

If you do have full permission ... well, let's get specific.

I've had a look at my system, which has libreoffice and I don't have /usr/share/libreoffice/share/config/images_helpimg.zip.dpkg-new. Everything seems to work fine for me. Nevertheless, let's have a look at the directory:

ls -l -d /usr/share/libreoffice/share/config

The first part of that response is hopefully something like


If it isn't, I'll leave you to make it so, using chmod (man chmod will explain how to use it).

Then take a look at the files in the directory:

ls -l /usr/share/libreoffice/share/config

My system shows:

-rw-r--r-- 1 root root 1337709 Jan 23 17:51 images_breeze.zip
-rw-r--r-- 1 root root 3084230 Jan 23 17:51 images_galaxy.zip
-rw-r--r-- 1 root root 2079435 Jan 23 17:51 images_oxygen.zip
-rw-r--r-- 1 root root 7845910 Jan 23 17:51 images_tango.zip

The important part for you is that first permissions block. Everything should be read-write for root (rw-) and at least read for others (r--r--).

If that all turned out to be OK, then all I can think to suggest is to remove libreoffice and reinstall it. But first make sure your packages are up-to-date and I would also advise a complete upgrade, just to be sure. So,

apt update
apt upgrade

See if that has fixed your problems. If not:

apt remove libreoffice

If the troublesome files are still there (ls -l /usr/share/libreoffice/share/config), then follow that up with

apt autoremove

Then put libreoffice back again

apt install libreoffice

I'll keep my fingers crossed for you.

  • Tried what you advised, and it didn't work; instead, I got this (also, I'm unsure what the correct form of approach w. self-doxxing is on this platform, so I removed all usage of my computer's name and my PPAs just in case) – KRACK_BIT May 17 at 20:11
  • I was able to remove LibreOffice and all the broken dependencies of LibreOffice by using sudo dpkg --purge --force-all [name] , and listing all the broken dependancies ; whether or not this fixes the issue still needs to be seen – KRACK_BIT May 18 at 10:44
  • OK, I was trying not to take you into purge, without knowing how far you had got in setting up and using libreoffice. Still, hopefully, that will sort things for you. Good luck! – Douglas Milnes May 19 at 1:23
  • 1
    Yeah, this fixes my issue temporarily, however, whenever I run sudo apt upgrade now, occasionally this exact same issue occurs with other packages, and the only way to get dpkg or apt working again is to force-purge the package and dependencies, and not reinstall, as that suffers the exact same error. So far, i have lost wine-staging, libreoffice and vscode this way. :-( – KRACK_BIT May 19 at 13:38
  • 1
    i found this article, though i am unsure if it is relevant to this issue – KRACK_BIT May 19 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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