apt upgrade stuck at "Setting up libc6:amd64 (2.37-14) ..." #11097
-
Windows Version10.0.22631.3085 WSL Version2.0.15.0 Are you using WSL 1 or WSL 2?
Kernel Version5.15.133.1-1 Distro VersionDebian testing Other SoftwareNo response Repro StepsIn Debian Testing
While upgrading Expected BehaviorShould be able to upgrade Actual BehaviorAnd I can see A lot of people also having this problem: https://unix.stackexchange.com/questions/767340/apt-stuck-on-setting-up-libc6 Diagnostic LogsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
I had the same issue, #11035 (comment) fixed it. As far as I can tell if you don't have
The /run/systemd/system directory is not created and the tests in the postinst for libc fail: # Restart init. Currently handles chroots, systemd and upstart, and
# assumes anything else is going to not fail at behaving like
# sysvinit:
TELINIT=yes
if ischroot 2>/dev/null; then
# Don't bother trying to re-exec init from a chroot:
TELINIT=no
elif [ -n "${DPKG_ROOT:-}" ]; then
# Do not re-exec init if we are operating on a chroot from outside:
TELINIT=no
elif [ -d /run/systemd/system ]; then
# Restart systemd on upgrade, but carefully.
# The restart is wanted because of LP: #1942276 and Bug: #993821
# The care is needed because of https://bugs.debian.org/753725
# (if systemd --help fails the system might still be quite broken but
# that seems better than the kernel panic that results if systemd
# cannot reexec itself).
TELINIT=no
if systemd --help >/dev/null 2>/dev/null; then
systemctl daemon-reexec
else
echo "Error: Could not restart systemd, systemd binary not working" >&2
fi
fi
if [ "$TELINIT" = "yes" ]; then
telinit u 2>/dev/null || true ; sleep 1
fi |
Beta Was this translation helpful? Give feedback.
-
The above fix did not work for me, but this answer did: But then with the next upgrade to "Setting up libc6:amd64 (2.37-15) ..." my fix apparently was overriden again in the process, and the upgrade got stuck forever again.
So I had to repeat the fix
and I could do this again to successfully do this in the end |
Beta Was this translation helpful? Give feedback.
-
sudo dpkg --configure -a << correctly Thx this work for me too |
Beta Was this translation helpful? Give feedback.
I had the same issue, #11035 (comment) fixed it.
As far as I can tell if you don't have
[boot] systemd=true
The /run/systemd/system directory is not created and the tests in the postinst for libc fail: