package systemd-sysv 237-3ubuntu4 failed to install/upgrade: installed systemd-shim package post-removal script subprocess returned error exit status 2

Bug #1756755 reported by Aurélien COUDERC
380
This bug affects 89 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Confirmed
Undecided
GMPH

Bug Description

Upgrading from xenial to bionic failed the removal of systemd-shim.
I think the messages were the same as the following, that I can reproduce by running "apt upgrade" from the upgraded system:

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/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
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: systemd-sysv 237-3ubuntu4
ProcVersionSignature: Ubuntu 4.15.0-12.13-generic 4.15.7
Uname: Linux 4.15.0-12-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
Date: Sun Mar 18 22:52:00 2018
ErrorMessage: installed systemd-shim package post-removal script subprocess returned error exit status 2
InstallationDate: Installed on 2013-01-11 (1892 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
Python3Details: /usr/bin/python3.6, Python 3.6.5rc1, python3-minimal, 3.6.4-1
PythonDetails: /usr/bin/python2.7, Python 2.7.14+, python-minimal, 2.7.14-4
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu1
 apt 1.6~beta1
SourcePackage: systemd
Title: package systemd-sysv 237-3ubuntu4 failed to install/upgrade: installed systemd-shim package post-removal script subprocess returned error exit status 2
UpgradeStatus: Upgraded to bionic on 2018-03-18 (0 days ago)

Revision history for this message
Aurélien COUDERC (coucouf) wrote :
Revision history for this message
Aurélien COUDERC (coucouf) wrote :

The system was initially installed with trusty/12.04, then migrated to xenial/16.04 and now bionic/18.04.

Revision history for this message
Aurélien COUDERC (coucouf) wrote :

Solved with running:

dpkg-divert --remove /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service

apt upgrade

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

*sigh* one should not have systemd-shim installed in xenial, either.
one should not use upstart as pid one in xenial, either.

I will check if I can add more metadata to systemd in bionic to handle this case better.

tags: added: bb-incoming
Revision history for this message
Aurélien COUDERC (coucouf) wrote :

Not that I've done anything more fancy than update-manager -d…
Specifically not played with the pid 1 defaults that I can remember.

Revision history for this message
xor (xor) wrote :

I am also affected and I did not manually install systemd-shim and did not tamper with upstart.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Just ran into the same with xenial → bionic upgrade.

Revision history for this message
Steve McConnel (stephen-mcconnel) wrote :

system had been upgraded from trusty to xenial in the past

GMPH (gmphtravel)
Changed in systemd (Ubuntu):
assignee: nobody → GMPH (gmphtravel)
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 1773859, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.