package libc6:amd64 2.31-0ubuntu3 failed to install/upgrade: installed libc6:amd64 package post-installation script subprocess returned error exit status 127

Bug #1866844 reported by Bullet
74
This bug affects 14 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Fix Released
Critical
Unassigned
Focal
Fix Released
Critical
Unassigned

Bug Description

cannot install this package

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: libc6:amd64 2.31-0ubuntu3
ProcVersionSignature: Ubuntu 5.4.0-14.17-generic 5.4.18
Uname: Linux 5.4.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu19
Architecture: amd64
Date: Tue Mar 10 09:39:56 2020
DuplicateSignature:
 package:libc6:amd64:2.31-0ubuntu3
 Setting up libc6:amd64 (2.31-0ubuntu3) ...
 /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
 dpkg: error processing package libc6:amd64 (--configure):
  installed libc6:amd64 package post-installation script subprocess returned error exit status 127
ErrorMessage: installed libc6:amd64 package post-installation script subprocess returned error exit status 127
InstallationDate: Installed on 2020-03-07 (2 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200304)
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu2
 apt 2.0.0
SourcePackage: glibc
Title: package libc6:amd64 2.31-0ubuntu3 failed to install/upgrade: installed libc6:amd64 package post-installation script subprocess returned error exit status 127
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bullet (angeleyes972) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in glibc (Ubuntu):
status: New → Confirmed
Revision history for this message
RobertH (robert-hunt) wrote :

Can't confirm that it's exactly this bug coz now locked out of system. Before getting locked out completely, running "sudo anything" would immediately say 3 attempts failed.

Revision history for this message
Rumato Estorsky (rumatoest) wrote :

I have the same issue. Istallation of libc6 failed.

After this sudo stop working and after reboot I'm not able to log in into system. It behaves like any login in system does not exists.

Revision history for this message
Rumato Estorsky (rumatoest) wrote :

IMPORTANT NOTICE

After facing this bug users probably would not write about it in launchpad. Because most of them probably would try to reboot their system and will be not able to log in again :)

Revision history for this message
Jeffrey Bouter (jbouter) wrote :

Once this hits you, GDM won't start. You're able to switch to TTY though. But when attempting to login there, you're greeted with "Login incorrect" even prior to asking for your password.

Revision history for this message
Rik Mills (rikmills) wrote :

If people are still hitting this error now, can you please provide details of the package versions before and after upgrade (or what it was trying to upgrade to.

e.g, the original report was on upgrading glibc to (2.31-0ubuntu3) over (2.30-0ubuntu3), while now 2.30-0ubuntu5 is the current version in release pocket.

also what was the version of libcrypt1 (if any) before and after the upgrade

Revision history for this message
Jeffrey Bouter (jbouter) wrote :

My libc6 upgrades went from 2.30-0ubuntu3 to 2.31-0ubuntu5. My version of libcrypt1 prior to upgrade was 1:4.4.10-10ubuntu1.

I will add both the dpkg.log and apt history log

Revision history for this message
Jeffrey Bouter (jbouter) wrote :
Revision history for this message
brett hassall (brett-hassall) wrote :

Same problem.

Is there a way to recover the system without full re-install?

Revision history for this message
brett hassall (brett-hassall) wrote :

from apt history.log :
libc6:amd64 (2.30-0ubuntu3, 2.31-0ubuntu5)
libcrypt1:amd64 (1:4.4.10-10ubuntu1, 1:4.4.10-10ubuntu4)

Revision history for this message
Jeffrey Bouter (jbouter) wrote :

I have resolved the issue by doing the following:

1) From grub, change the linux line; remove 'quiet' and 'splash', and change 'ro' to 'rw init=/bin/bash' (see below if you need more information)

This will allow you to boot into your system sort of"recovery mode".

2) When booted, run: mount -o remount,rw /

3) Copy a "bogus" library over the library that the upgrade is expecting: cp /lib/x86_64-linux-gnu/libcrypt.so /lib/x86_64-linux-gnu/libcrypt.so.1

4) run: apt --fix-broken install

5) Resume the original upgrade: apt full-upgrade

6) reboot (this might require forcefully rebooting using your power or reset button)

Information regarding the grub bit:

It may take a few tries to get into grub. You need to press ESC at the right time during the boot process (just after your bios/efi post has shown), or forcefully rebooting during startup will most likely bring you there as well

Select the "ubuntu" line, and hit the 'e' key on your keyboard.

Go to the line that looks like:

linux /boot/vmlinuz-5.4.0-14-generic root=UUID=<a lot of numbers> ro quiet splash $vt_handoff

Change it into:

linux /boot/vmlinuz-5.4.0-14-generic root=UUID=<a lot of numbers> rw init=/bin/bash $vt_handoff

Revision history for this message
Alex (k-alex-s) wrote :

Same problem here,

I fixed following instructions given by Jeffrey Bouter (jbouter), even if trying to change parameters on grub didn't works for me, so I use the LiveCDrecovery method (https://help.ubuntu.com/community/LiveCdRecovery) to chroot the system and then I followed steps 3,4,5 and 6.
It fix the problem and right now I'm writing from the recovered system

Revision history for this message
brett hassall (brett-hassall) wrote :

thanks.

this worked for me.

I have another linux partition installed so I booted into the other partition, manually installed the contents of the new libcrypt1 .deb (it is only a lib and a link). The deb was already in the cache from the failed update.

Rebooted back into focal. I could now login. sudo worked again too.
To tidy up, ran:
sudo apt --fix-broken install
sudo apt-get update

All seems good for now.

Revision history for this message
Emanuele (emanuc) wrote :

This is the list of upgradeable packages: https://paste.ubuntu.com/p/PK6WFz5Xgy/
I have this list because I recovered the system (thankfully) with Timeshift Btrfs.

Rik Mills (rikmills)
Changed in glibc (Ubuntu):
importance: Undecided → Critical
Revision history for this message
CS (tinytux) wrote :

Booting from USB with the latest daily build, mounting the disk, chroot and following Jeffreys instructions helped me fix my system. Thanks a lot!

Revision history for this message
Steve Langasek (vorlon) wrote :

The bug filed here is about an upgrade to libc6 2.31-0ubuntu3 which was known to be buggy and never migrated out of focal-proposed. It is therefore not a good description of the problem. I'm looking now at trying to reproduce this problem, but what we need are good logs from a user who was affected by this when upgrading to -0ubuntu5 in the focal release pocket.

Revision history for this message
Steve Langasek (vorlon) wrote :

And what I really need here for logs are the apt term.log from someone affected

Revision history for this message
Steve Langasek (vorlon) wrote :

Marking https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1867431 as the primary bug because as noted, this bug is not the same issue as anything users are experiencing in the focal release pocket. Please follow up there.

Changed in glibc (Ubuntu Focal):
status: Confirmed → Fix Released
Revision history for this message
Andre Brait (andrebrait) wrote :

Same thing just happened to me. I do a full upgrade everyday. I did one yesterday and it broke when I did another one a few hours ago. I don't know if this time frame helps.

Revision history for this message
Mike L (mikerl) wrote :

Ran into the same issue. Had to also chroot in and update, dist-upgrade fix broken install, then copy the .so files and then everything was fine after a reboot. Hours of time gone, but thanks to you guys, it's fixed! I ironically ran into this or a similar issue after experiencing problems with libc6 on eoan. Said issue caused me to upgrade early hoping to avoid similar bugs. So much for that. Please not only look into this, but ensure eoan isn't bugged as well, even with it soon being on the backburner.

Revision history for this message
CS (tinytux) wrote :

I normally run
sudo apt update && sudo apt dist-upgrade && sudo apt autoremove

Here is the term.log, hope it helps.

Unpacking libc6:amd64 (2.31-0ubuntu5) over (2.30-0ubuntu3) ...
Setting up libc6:amd64 (2.31-0ubuntu5) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
error processing package libc6:amd64 (--configure):
 installed libc6:amd64 package post-installation script subprocess returned error exit status 127^
Errors were encountered while processing:
 libc6:amd64

Revision history for this message
Kamilion (kamilion) wrote :

Ran into this myself.

Here's my wajig history. Normally I run 'dailyupgrade' when I have a chance to get this build VM updated, and then rebuild my ISOs with it after a reboot, on a matching kernel so the right modules get built by dkms and baked into my ISO and it's initramfs.

Line 2589: 2020-03-14T20:29:35 remove libc6 2.30-0ubuntu3
is the only occurrence in the log.

Revision history for this message
Kamilion (kamilion) wrote :

And one more log of my terminal session during the problem.

Was paying attention on IRC; another bug #1867423 pointed out a symlink.
`ln -s /lib/x86_64-linux-gnu/libcrypt.so.1.1.0 libcrypt.so.1`
in another root terminal was enough to get apt to bring things back to sanity.

Revision history for this message
John Feole (jfeole) wrote :

This bug caused me to lose 3 desktops in rapid succession when they upgraded yesterday.

Like others,after finding this bug, and using comments 12 and 13, and the livecd boot, was able to recover all 3 of them..after hours of wasted time.

I am an Ubuntu user from the earliest revisions, and wonder, how was this released in this
state? As right when it installs, it disables the desktop, and when you reboot, login is broken.. Was it even tested??

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.