I compiled Glibc 2.29, the installation was unsuccessful and I want to remove it. How to proceed?

I compiled a version of Glibc (2.29) required by a game that I downloaded from the internet. I did all the procedures listed on a site (upgrade - How to update glibc to 2.14 in CentOS 6.5 - Unix & Linux Stack Exchange) but the installation gave an error in the middle of the process and my computer does not respond correctly anymore. All the commands that I will type in the terminal give segmentation fault. If I don't open the terminal as root, I can't even list directories with 'ls', unless I'm as root.

My intention is very objective: remove Glibc 2.29 or fix these problems without having to reinstall the system. Could someone help me or suggest something to do? All help is most welcome. I expect an answer.

Glibc is a large gathering of shared libraries, so they need to all point to the right place, otherwise you will get those faults.
Without knowing more about your system and whether you had a previous version of glibc; what steps you took and where during those steps you began encountering errors, it would be tricky to troubleshoot.
You can use patchelf tool to make it easier- but I cannot give a walkthrough on how to use it as I have never actually used it:

Patchelf can be used to repair the paths.

True, my post lacked a bit of information, I apologize. My computer is running Zorin OS 15.3 Lite, and I followed the full glibc installation here: upgrade - How to update glibc to 2.14 in CentOS 6.5 - Unix & Linux Stack Exchange (in reply with 81 upvotes. However, I changed from version 2.14 to 2.29 in the terminal and this is not a problem). I can't see which versions of Glibc I have installed and which was prior to that unsuccessful installation, I just researched how to install Glibc 2.29 and arrived at the site. I hope this additional information is useful in some way.

I will check NixOS/patchelf for more information on how I can be fixing the problem.

You cannot use LD_LIBRARY_PATH to point to a different version of glibc. The executable you retrieved with wget contains the code specifying the path to ld.linux.so; any change you make afterward will only misdirect from that path. That is not so easy to fix, so I am sad to say that patchelf is probably your Best Hope at this point.

glibc installation is not for the faint of heart. A typo can throw the whole thing off and result in a wipe and reload. This is One Thing about Online Tutorials on Linux that Really Bothers Me. While some of these posts may be made with the best of intentions, these posts often do not take into account adequate instruction or warnings. Even the one you linked to is meager:

You cannot update glibc on Centos 6 safely

Ya Think?!
Sometimes, it is like asking for Automotive help at the bus stop.

Does this all mean that my system is broken? I may have to save everything here and do a clean reinstall.

I couldn't find much useful information on how I could proceed with the patchelf.

Edit1: I would not like to format it because I installed a lot packages
via apt, and configured a lot as my main system ... losing all of that sucks.

Given all things, I agree that Useful Information is a good idea. I just tried a search and have not found much.

We all know the feeling.
Sometimes we can take it as "lesson Learned" and perform installations with care - as well as using apps like TimeShift prior to a Risky Installation. This way we can reinstall the OS to the same state (including installed software and configs) to how it was prior to the 'oops.'

I liked your views, and it gave me a better view of how I could mess things up just by installing anything.

I would like to say that after several times that I restarted the computer, the terminal returned to work correctly. However I have doubts if only the terminal that had stopped working. Do you have any idea what may have affected the computer? The terminal is "ok", but I don't know other things.

Anything that calls on glibc will start throwing errors. In restarting, you may have killed the process for glibc, but as soon as any process needing glibc is started, glibc will also start.
You MAY try a total removal of glibc while the process is not running.
You can use synaptic package manager. If you do not have synaptic, you can install it with

sudo apt install synaptic

Then run synaptic and hit the Search button on the toolbar. Enter in


Then find any glibc packages that are checked, right click them and select "Complete Removal".
DO NOT REMOVE libnss-systemd AND libnss-mdns or any other libnss files.

If glibc successfully is removed, then you may be in the clear as far as that build creating errors. Next you will want to use the locate command in terminal and search for any residual glibc configuration files. libc-6 and libc-bin - instead of removing, just rename them to -old. This way if something goes wrong, you can restore them by renaming to the original file name, removing the -old from the name.
Once complete, if you like, you can then make backups and attempt re-installation of glibc. The highest supported package for glibc is 2.27 for Zorin OS 15.3. So, installing glibc 2.29 may throw other errors in any case. Which, I suspect, is the reason you ended up installing from source; you wanted a higher version than what was currently available.

Otherwise, glibc 2.27 from Bionic should be the way to go.

If this is not a high enough version- I would suggest anticipating the upcoming release of Zorin 16 which can support a higher version, perhaps in April.

In installing: 99% of the time, it is not dangerous to install software. But when it comes to building from source or building a package known to conflict or in need of directed attention from source; it can get dangerous. If you are installing from terminal with apt, or .deb packages or from Synaptic- you should be safe the vast majority of time. When building from source, please use this forum as a resource, but stay wary of answers and double-check everything against a variety of sources. (Don't believe what you read on the internet). Oftentimes, building from source means accessing the developers page which is usually populated with much documentation on the process and pitfalls.

1 Like

glibc packages such as 'glibc-doc'? or all search packages with key-word 'glibc', except libnss?

If it says "Glibc" specifically, click to remove.
The search I had suggested was just to make an easy search. But glibc-source, glibc-doc are the ones you are looking for.

The only glibc packages I found were 3 (glibc-doc, glibc-doc-reference, glibc-source), they have no option to complete remove... there is no single package called glib, below I leave a screenshot if it helps in something

Given the errors- it may have never really installed.
You might look in the appropriate directories and just remove the files manually.

I forgot to mention that I deleted all the files after I compiled (and after that made an error at the end of the build), does this have to do with what you are talking about?

By typing locate glibc I find the glibc configuration files, correct?

If so, do I just need to remove them?

Yes, move to root in terminal

sudo -i


locate glibc



Leave those directories.

Otherwise, remove the rest- and then repeat the same in home terminal.

I'm done. What is the next step? I can already feel my system better.

In terminal, you can enter

sudo apt-get install glibc-doc

Read the terminal output and make sure everything looks good before hitting the "y" key.
Install, then check your installation to make sure no errors. Reboot and test the game that requires glibc.

Terminal output when I try to run the game (the same as the previous one):

mayla99654@maylavettel-pc2:~/Área de Trabalho/Funkin Friday Night$ ./Funkin ./Funkin: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./Funkin)

Ok, so it requires a higher version than the one supported by the operating system.
You have a couple choices: Install a different (newer) distro - or wait until around April for the release of Zorin OS 16.

Okay, thanks for the help so far!

1 Like