Fedora 38->40 Upgrade failed /bin/bash required glibc_2.38

Per the title, I upgraded my desktop from Fedora 38->40. That part was successful.

I was going to upgrade to Fedora 41, but new dependency errors appeared that seemed to be tied to sagemath, which i had removed in Fedora 38, prior to upgrading.

So, I did a remove-retired-packages to see if this would clear up the message. Except, the system came to Zlib would affect sudo and I shouldn’t remove it.

Since this was all driven by KiCAD and ngspice not talking under Fedora 38, I decided to see if they were working now. While KiCAD simulator was able to run ngspice now, ngspice refused to work because a needed library from Fedora 38 was missing??? I started a new CLI and attempted to run ngspice manually, and got the same result. Strange.

Then I started getting the error that bash needed glibc_2.38. I’m like why?

I tried to shut down, but that option was missing grom the menu.

Shutdown from the CLI failed becuase … gblibc_2.38 was missing.

So … I killed the system only to have the boot loader fail. No reason given, and I can’t start a previous version becuase of an MB issue with USB keyboards … arrorws only hit 1st and last options in grub??? another issue for another day.

Anyway, started live CD, followed my notes for recovering an OS from a previous issue concerning a BTRFS file system that burped on me.

Got to the point where I do chroot /mnt and it said … cant find glibc_2.38.

So, how do I fix this problem.

I wish fedora had a way to restamp their OS and config files into the existing system without requiring me to wipe and reload. I don’t want to loose all the configuration settings I’ve put on this drive. As well as the time needed to reload everything.

Very frustred, plz help, thx

#chroot, f38, f40, #glibc_2.38, upgrade

The recovery process should look like this:

  • Boot a Fedora 40 live session.
  • Mount the installed system partitions.
  • Do not run the chroot command.
  • Use DNF and RPM from the live system:
sudo dnf distro-sync \
    --refresh \
    --allowerasing \
    --releasever=40 \
    --installroot=/mnt

sudo rpm -V -a --root=/mnt

See also: Dnf update fails with hanging during the update - #3 by vgaetera

3 Likes

Will give it a try and let you know the results

This was successful at restoring my system =)

1 Like

Just so that everyone knows the steps …

First get a Live CD with the OS that matches yours. Nothing older, nothing newer.

Boot into the Live CD on the affected system.

Open a terminal

su or sudo the following commands:

Determine if sda2 is root, or if another partition is root.

> blkid | grep /dev/sd
> ls -lha /dev/disk/by-uuid
> lsblk -l

Connect root to /mnt

> cd /
> mount /dev/sda2 /mnt
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
> mount -o bind /dev /mnt/dev
> mount --bind /run /mnt/run  
> mount /dev/sda1 /mnt/boot

Normally, you would use chroot at this point to manipulate the OS on the target drive, but since the file system is corrupted, dnf will need to repair it from here.

> dnf distro-sync \
    --refresh \
    --allowerasing \
    --releasever=40 \
    --installroot=/mnt

Note that dnf took a long time to complete the repairs. While it looks like it’s stuck, watch the hard drive activity using iotop or a hard drive light.

> rpm -V -a --root=/mnt

Once these commands are complete you can reboot.

> reboot -p

If all goes well, your system should be restored to normal working order, and the previous offending OS should be removed.