How to fix broken Ubuntu 20.04 upgrade in WSL 1 / libc6 & sleep

I recently sudo do-release-upgrade -d my ubuntu 18 LTS inside my WSL 1 to the new Focal Fossa and ended up with a broken system.

libc6:amd64 (2.31-0ubuntu9) wird eingerichtet …
Checking for services that may need to be restarted…
Checking init scripts…
Nothing to restart.
sleep: cannot read realtime clock: Invalid argument
dpkg: Fehler beim Bearbeiten des Paketes libc6:amd64 (–configure):
Unterprozess installiertes libc6:amd64-Skript des Paketes post-installation gab den Fehler-Ausgangsstatus 1 zurück
Fehler traten auf beim Bearbeiten von:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

After some investigation I fixed it by editing /var/lib/dpkg/info/libc6:amd64.postinst – I just needed to remove the sleep from the script.

After that a simple sudo apt --fix-broken install fixed the issue and I was able to finish the upgrade via sudo apt dist-upgrade.

Veröffentlicht am
Kategorisiert in Allgemein

Von flake

addicted to music