595. Issue upgrading debian jessie -- stuck at systemd

Doing a dist-upgrade yesterday (9th of October 2014) it failed because of issues with configuring systemd. In the end my troubleshooting didn't help, but google did.

Dead-end troubleshooting:

Trying to work through it:

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
systemd-sysv : Depends: systemd (= 208-8) but 215-5+b1 is installed
E: Unmet dependencies. Try using -f.

Checking why systemd-sysv is mentioning 208-8 instead of 215-5:

apt-cache policy systemd-sysv
systemd-sysv:
Installed: 208-8
Candidate: 215-5+b1
Version table:
215-5+b1 0
500 http://ftp.iinet.net.au/debian/debian/ testing/main amd64 Packages
*** 208-8 0
100 /var/lib/dpkg/status

Let's try forcing 215-5:

sudo apt-get install systemd-sysv=215-5+b1
Reading package lists... Done
Building dependency tree
Reading state information... Done
[..]
The following packages will be upgraded:
systemd-sysv
1 upgraded, 0 newly installed, 0 to remove and 531 not upgraded.
422 not fully installed or removed.
Need to get 0 B/29.1 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Setting up systemd (215-5+b1) ...
dpkg: error processing package systemd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)

OK, let's try working on systemd:

sudo dpkg -D2 --configure systemd
Setting up systemd (215-5+b1) ...
D000002: fork/exec /var/lib/dpkg/info/systemd.postinst ( configure 208-8 )
dpkg: error processing package systemd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
systemd


Solving it:
No luck. Google wasn't too helpful initially, until I came across https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762275

sudo delgroup systemd-journal
Removing group `systemd-journal' ...
Done.

Then tried

sudo dpkg -D2 --configure systemd
Setting up systemd (215-5+b1) ...
D000002: fork/exec /var/lib/dpkg/info/systemd.postinst ( configure 208-8 )
/var/lib/dpkg/info/systemd.postinst: 128: /var/lib/dpkg/info/systemd.postinst: cannot open /run/systemd/was-enabled: No such file

and

sudo apt-get install -f
[..]
Do you want to continue? [Y/n] Y
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
(Reading database ... 462023 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_215-5+b1_amd64.deb ...
Unpacking systemd-sysv (215-5+b1) over (208-8) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up systemd-sysv (215-5+b1) ...
[..]

and then

sudo apt-get dist-upgrade

works again!

Many reasons to dislike systemd, although in this case I guess it's poor packaging.
Previous
Next Post »