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 ExchangeI 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:
- Downgrading GLIBC will very likely make your system unbootable.
- You totally misunderstood the error -- your system doesn't have
GLIBC-2.34in the first place -- it hasGLIBC-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).
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.
Downgrade glibc on ubuntu 18.04 - Stack Overflow
Help to downgrade glibc version to complile exploit
Downgrade GLIBC version on ubuntu 20.04 - Stack Overflow
I downgrade glibc, and I can not boot any more
Hello everyone I was doing tartarsauce machine and need some help/direction to change the glibc version to 2.22 as the version is superior in my machine.
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.
Hey folks,
I recently needed glibc 2.35 for building some models, so I added the jammy package to my /etc/apt/sources.list and installed the required version. However, I'm now facing unmet dependencies while trying to install clang due to the updated glibc version.
Could someone guide me on how to revert back to glibc 2.31 without disrupting my current setup?
Thanks in advance!
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
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
Changing the system glibc will almost certainly result in a disaster. I think you have 2 solutions: multiple glibc on one system or link glibc statically
Trying to unistall glibc tells me that will crash the operation system. :-)
I don't understand your smiley.
It will render your system unbootable, yes.
What you want to do is best achieved in one of several ways:
- Create a Linux-to-older-Linux cross-compiler
- Create a "older Linux" chroot environment (ChromeOS uses this approach)
- Create a "older Linux" virtual machine, and develop inside of it.
Approach 2 is likely easiest to set up, closely followed by approach 3.
Approach 1 gives you the best build performance, but requires thorough understanding of how to build cross-compilers.