Score:0

Failure to upgrade Ubuntu due to package removal failure of 'systemd-shim'

es flag

Every time a 'partial upgrade' or 'normal upgrade' of the Ubuntu OS, it is failing every time because of the failure of the systemd-shim package.

Even after I manually execute the following command (per the instructions post-failure) and retry the upgrade process:

apt-get install -f
apt autoremove systemd-shim

I have screen-shots but image files are 2MB+.

ChanganAuto avatar
us flag
Ubuntu release/version? Please don't post screenshot of command and their output. Always post as text formatted as code.
mchid avatar
bo flag
Just edit your question and copy and paste the output. On a blank line above the output put three backtics at the beginning of the line ``` On a blank line after the output do the same (three backtics at the beginning of the line ```). This "codefencing" will format the output as code for your question. Thanks.
mchid avatar
bo flag
Alternatively, you can copy, paste, highlight the code, and then press CTRL+K and it will format automatically.
es flag
My current OS version: Linux 4.15.0-169-generic #177-Ubuntu SMP Thu Feb 3 10:50:38 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
es flag
NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)"
nobody avatar
gh flag
Remove the package with dpkg.
es flag
I have attempted to remove he package via the dpkg program to no avail (as I just attempted generated the same results): dpkg -r systemd-shim (Reading database ... 262747 files and directories currently installed.) Removing systemd-shim (9-1bzr4ubuntu1) ... Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim' dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services
es flag
/org.freedesktop.systemd1.service' with different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed dpkg: error processing package systemd-shim (--remove): installed systemd-shim package post-removal script subprocess returned error exit status 2 Errors were encountered while processing: systemd-shim
starkus avatar
de flag
Maybe you can find some help in this German thread: https://forum.ubuntuusers.de/topic/problem-mit-systemd-shim/
Organic Marble avatar
us flag
Put the info in the question, not in comments.
Score:0
my flag

There is no package called systemd-shim in Bionic (Ubuntu 18.04), so, you are having an obsolete and unsupported package in your system. Better purge the package using dpkg:

sudo dpkg -P --force-all systemd-shim

Then run autopurge to remove the dependencies:

sudo apt autopurge

Then reinstall systemd:

sudo apt install --reinstall systemd
Score:-1
gh flag

for non german, try to translate.

Package systemd-shim is since bionic no longer available. with

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak

the file which is in the old(xenial)package systemd-shim and in the bionic systemd package is renamed.

Now

sudo dpkg -P systemd-shim

removed the xenial package.

For security

sudo apt install --reinstall systemd
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.