How to fix "dpkg: error processing package systemd (--configure):
Check if you are the owner of all directories:
stat / /dev /var
If you aren't the owner, run the following in terminal:
chown root DirectoryYouAreNotOwner
Note: replace DirectoryYouAreNotOwner with the directory that you aren't owner of. So for example if the owner of /
was unknown
:
chown root /
Credit to this Ask Ubuntu post.
Ilak
Updated on September 18, 2022Comments
-
Ilak over 1 year
I recently upgraded from 16.04 to 18.04, and I think something went wrong with the upgrade. When I run
sudo apt-get install -f
, it tries to upgradeudev
, but then I get repeated messages about "unsafe symlinks" and this error message:dpkg: error processing package systemd (--configure): installed systemd package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: systemd E: Sub-process /usr/bin/dpkg returned an error code (1)
I was getting a similar message about
systemd-shim
earlier, but managed to fix it. I also had a problem with incorrect/etc/apt/sources.list
, but I think that's fixed as well. I was getting various error messages during the upgrade process, and at the end I had to "destroy" something instead of finishing the upgrade properly (unfortunately I don't remember exactly what happened.) Any ideas as to what's going on?-
ldias almost 4 yearsDoes this help you: askubuntu.com/questions/1171668/…
-
Ilak almost 4 yearsYes, I believe so! Thanks!
-
ldias almost 4 yearsI wrote up an answer based on the post linked above. Please mark it as correct if it helped you.
-
-
Shahad Mahmud about 3 yearsI also have the same problem. But this method does not solve my problem.
-
ldias about 3 years@ShahadMahmud Are there any error messages? Can you give me more details? What version of Ubuntu, computer hardware, amount of RAM, etc?
-
bortunac over 2 yearsthank you !!!!!!! I've upgraded debian 10->11 as sudo my_name and indeed the / directory was owned by me not the root. ---