There are much simpler ways to downgrade the glibc as well. For example, yum will calculate all of the needed dependencies for you with a

yum downgrade glibc\* 

command. But beware: downgrading glibc is always a really dangerous trick, and it is so on every system.

Glibc on version 2.4 and 2.9 had already very good compatibility between them, I suggest for you the best option were is your 2.9 left.

Answer from peterh on Stack Exchange
Top answer
1 of 2
3

I want to downgrade my "glibc 2.34" to version 2.27 because when I run ./test_121 on my machine it gave me this error:

  1. Downgrading GLIBC will very likely make your system unbootable.
  2. You totally misunderstood the error -- your system doesn't have GLIBC-2.34 in the first place -- it has GLIBC-2.27, downgrading from 2.27 to 2.27 makes no sense.

Your problem is that this binary: ./test_121 was built against GLIBC-2.34 (or later) and requires that version (or newer) to run.

Your only choices are to run that binary on a newer system (or in a docker container with GLIBC-2.34 or newer), or to get a different binary (one that requires GLIBC-2.27 or older).

2 of 2
1

A binary requesting GLIBC-2.34 means the binary was compiled against Glibc 2.34 or newer, and it depends on some ABI not available before that version, otherwise the dependency isn't created.

One option to workaround this is to tune the APIs used until you don't hit that requirement anymore (but it is problematic/difficult), you can find where the problem is by using readelf -W -s on the binary, this will show all the used symbols, those with an @ in the name are versioned symbols.

The proper way to avoid this is to setup a "sysroot" tree resembling the intended target and cross-compile your application against it, using the --sysroot flag for the compiler (supported by GCC and Clang). The sysroot environment can be created by installing a system on an emulator or another machine then copying that, or using tools like debootstrap for Debian-based distros, rinse or rhbootstrap for redhat-based ones, etc, or you can create a generic one manually building the base system or using some build system (e.g. buildroot or openembedded/poky). In this way, the result will be guaranteed to work with the version it's compiled against.

Discussions

Downgrade glibc on ubuntu 18.04 - Stack Overflow
Ubuntu 18.04 comes with glibc 2.27. This breaks some tools I'm currently using for a project. Is there any way for me to downgrade glibc in 18.04 to 2.26? apt-cache shows that only version 2.27 is More on stackoverflow.com
🌐 stackoverflow.com
Help to downgrade glibc version to complile exploit
I would usually use a container for this. Downgrading your whole system is likely to break things. More on reddit.com
🌐 r/hackthebox
3
2
June 2, 2023
Downgrade GLIBC version on ubuntu 20.04 - Stack Overflow
Is there any way by which I can downgrade GLIBC version from 2.31 to 2.29 on my Ubuntu 20.04.4? I am trying to run kedro application on docker which gives me following error: OSError: /lib/x86_64-l... More on stackoverflow.com
🌐 stackoverflow.com
I downgrade glibc, and I can not boot any more
I try to recover from the live usb use sudo pacman --root /mnt -Syu but I get the following error :: Synchronizing package databases... core is up to date extra is up to date multilib is up to date :: Starting full system upgrade... resolving dependencies... looking for conflicting packages... More on forum.manjaro.org
🌐 forum.manjaro.org
0
0
March 4, 2024
🌐
Ask Ubuntu
askubuntu.com › questions › 1481001 › how-to-downgrade-glibc-version-on-ubuntu-20-04-6
How to downgrade glibc version on Ubuntu 20.04 6 - Ask Ubuntu
@cocomac The problem with this question is that it's not possible to safely downgrade the glibc version on Ubuntu, so the best answer to this question is that there is no answer.
🌐
Ask Ubuntu
askubuntu.com › questions › 1031006 › downgrade-glibc-on-ubuntu-18-04
Downgrade glibc on ubuntu 18.04 - Ask Ubuntu
Ah, I misread it as apt. Manually installing just the package might break dependencies, and recovering from a broken glibc would be a nightmare.
Find elsewhere
🌐
Gentoo Forums
forums.gentoo.org › viewtopic-t-1140970-start-0.html
Gentoo Forums :: View topic - how to downgrade glibc from 2.33 to 2.32
August 15, 2021 - FAQ | Search | Memberlist | Usergroups | Statistics | Profile | Log in to check your private messages | Log in | Register · Links: forums.gentoo.org | www.gentoo.org | bugs.gentoo.org | wiki.gentoo.org | forum-mods@gentoo.org
🌐
Narkive
rpm-list.redhat.narkive.com › bdXGK5ew › how-to-downgrade-glibc
How to downgrade glibc?
I can do this: rpm -Uvh --oldpackage glibc-2.3.2-5.i686.rpm glibc-common-2.3.2-5.i386.rpm glibc-devel-2.3.2-5.i386.rpm or, I can do: rpm -Uhv --oldpackage --replacefiles glibc-2.3.2-5.i686.rpm glibc-common-2.3.2-5.i386.rpm glibc-devel-2.3.2-5.i386.rpm or: rpm -Uvh --replacepkgs --replacefiles ...
🌐
GitHub
gist.github.com › harv › f86690fcad94f655906ee9e37c85b174
update glibc to 2.17 for CentOS 6 · GitHub
[root@iworx ~]# yum downgrade glibc glibc-common glibc-devel glibc-headers glibc-utils glibc-static libstdc++ libstdc++-static libstdc++-devel Loaded plugins: fastestmirror, replace, security Setting up Downgrade Process Loading mirror speeds from cached hostfile * base: mirror.dst.ca * epel: mirror.dst.ca * extras: mirror.dst.ca * remi-safe: repo1.ash.innoscale.net * updates: mirror.dst.ca * webtatic: us-east.repo.webtatic.com Resolving Dependencies --> Running transaction check ---> Package glibc.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade ---> Package glibc.x86_64 0:2.17-55.el6 will be
🌐
Manjaro Linux
forum.manjaro.org › support
I downgrade glibc, and I can not boot any more - Support - Manjaro Linux Forum
March 4, 2024 - I try to recover from the live usb use sudo pacman --root /mnt -Syu but I get the following error :: Synchronizing package databases... core is up to date extra is up to date multilib is up to date :: Starting full system upgrade... resolving dependencies... looking for conflicting packages...
🌐
Stack Overflow
stackoverflow.com › questions › 61753422 › how-to-downgrade-glibc-on-arch-linux
archlinux - How to downgrade glibc on Arch Linux? - Stack Overflow
After upgrading the system using : sudo pacman -Syu all browsers' tabs start crashing, I have faced this problem before and I solved it by downgrading the glibc package. but now I am trying to do...
🌐
Reddit
reddit.com › r/archlinux › accidentally downgraded glibc and now everything is broken
r/archlinux on Reddit: Accidentally downgraded glibc and now everything is broken
September 19, 2023 -

Yep.

Okay so every package attempts to link with GLIBC_2.38. I have GLIBC_2.37. I tried to boot into a live USB drive and chroot and upgrade the package, but it doesn't work because libarchive.so and libpgme.so doesn't find GLIBC_2.38. Any idea how I can fix this? I have a backup so it's not so bad if I have to reinstall. Kind of sucks though.

🌐
Reddit
reddit.com › r/gentoo › downgrade glibc in order to upgrade the whole system?
r/Gentoo on Reddit: Downgrade glibc in order to upgrade the whole system?
March 29, 2020 -

So, a few weeks ago (maybe 5?), I did what I do every sunday morning: sudo emerge-webrsync and after that sudo emerge --update --quiet --changed-use @world A regular update routine. One week later, the same thing, but now it told me that glibc's current version is 2.30 or something and that some package requires 2.29 in order to upgrade. It also wants to downgrade a few other packages like Firefox (from 78 to 68). Since then this error occurs every time I try to update. I've looked into package.use, checked whether date and time are correct and also tried other update mechanisms. The internet also doesn't provide any useful information (or maye it does and I haven't digged deep enough/overlooked something).

Soo... Do you have an idea what's going on? I would be thankful for help of any kind. Thanks for your help and time in advance. Stay healthy!

Edit: Formatting

🌐
GitHub
github.com › droidian › glibc-downgrade › blob › droidian › README.md
glibc-downgrade/README.md at droidian · droidian/glibc-downgrade
Rather simple tool to clear symbol versions for newer glibc releases from a shared library or executable.
Author   droidian
🌐
Reddit
reddit.com › r/gentoo › i accidentally installed a testing version of glibc, what is the best way to get back to a working state?
r/Gentoo on Reddit: I accidentally installed a testing version of glibc, what is the best way to get back to a working state?
January 25, 2020 -

I added ~amd64 to my system-wide accepted keyword, because I didn't understand what it did and it was suggested for one of the packages I installed. I now understand that I should have just added that keyword for the package I was installing rather than system-wide.

I updated my whole system after doing this, and have ended up in an unstable state (I can only log in through a TTY) and my glibc is on a testing version (2.30). I don't know the best way to get everything back to stable versions.

Is it possible to rebuild everything correctly using a live boot?

Thanks

Top answer
1 of 3
11
The absolute safest thing to do is to just keyword ~sys-libs/glibc-2.30 and wait for time to pass. It'll reach stable eventually. glibc is very unlikely to be the cause of your issues as 2.30 hasn't really had any noteworthy reported issues.
2 of 3
3
I'm curious, why do you believe it's glibc in particular that's to blame? That being said, downgrading glibc is typically not a good idea and is actually probably a surefire way to break your system even further, although it sounds like you're most of the way there already. That's why gentoo will not allow you to downgrade it: $ sudo emerge =glibc-2.29-r7 Password: Calculating dependencies... done! >>> Verifying ebuild manifests >>> Running pre-merge checks for sys-libs/glibc-2.29-r7 * Checking general environment sanity. * Sanity check to keep you from breaking your system: * Downgrading glibc is not supported and a sure way to destruction. You might check out this thread on f.g.o. One of the things he mentions is that you might be okay if you hadn't built much against the newer version of glibc, but if you're downgrading to a version that doesn't have much built against it, you'll run into issues. I think that will especially be the case if you don't have a version of gcc built against that older version of glibc that you're trying to downgrade to. Believe it or not, it may be quicker just to reinstall if you want to get back to a mostly non-~amd64 system, especially if you have the means to back up your data before doing it. You're going to have to emerge -e @world anyway.