Check it is actually needed

Firstly check the python application as it could be out of date and is probably misreading the glibc version. CentOS shows the base version as installed and is patched to keep up with changes and it could just be a case of fixing the version that is being looked for in the code as a quick fix, but if the application is being actively developed you need to let the developers know or fork it for yourself if you can.

An up to date glibc on CentOS 7 should be 2.17-196.el7_4.2

If it is needed, Containerise

If it's absolutely necessary to run this application, the official RHEL approach would be to containerize, but you would still need to provide a working glibc, which wouldn't be possible with stock CentOS 7.

As a last resort, install glibc in a nonstandard location

If this isn't viable, and as an absolute last resort, it is possible to install a newer version of glibc than 2.18 as that is 9 years old now and glibc has been updated for several vulnerabilities and I'm not sure off the top of my head if it will build with the version of make in CentOS 7, but any newer version should work as follows:

  • This can potentially affect the functionality of your computer so make sure you know what you are doing

You can build the version of glibc you require elsewhere on your server and add it to LD_LIBRARY_PATH for the application. Note this must only be done for the application only.

wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxvf glibc-2.18.tar.gz
cd glibc-2.18
mkdir build
cd build
../configure --prefix=/opt/glibc-2.18
make -j4
sudo make install

Then to run a binary you need to use patchelf to update its interpreter

patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 program_you_are_running

And you need to enable it to find the new glibc library, either by

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.18/lib

Or you can use patchelf to update the binary's rpath (you can combine this with the previous pathelf command)

patchelf --set-rpath /opt/glibc-2.18/lib:/usr/lib64 program_you_are_running

If you change LD_LIBRARY_PATH don't export it for the whole system because all the binaries unmodified by patchelf will segfault.

/opt is the standard place to install third-party applications and libraries but you can use any path away from the system paths.

Answer from Simon Greenwood on serverfault.com
🌐
Stack Exchange
unix.stackexchange.com › questions › 787053 › how-to-run-node-v20-x-on-centos-7-9
gcc - How to run node v20.x on CentOs 7.9? - Unix & Linux Stack Exchange
I've built and installed GCC 10.3 from source, which I've read was required for node 20 but still getting errors. These are the errors I currently have on running node . node . node: /lib64/libm.so.6: version `GLIBC_2.27' not ...
Top answer
1 of 3
23

Check it is actually needed

Firstly check the python application as it could be out of date and is probably misreading the glibc version. CentOS shows the base version as installed and is patched to keep up with changes and it could just be a case of fixing the version that is being looked for in the code as a quick fix, but if the application is being actively developed you need to let the developers know or fork it for yourself if you can.

An up to date glibc on CentOS 7 should be 2.17-196.el7_4.2

If it is needed, Containerise

If it's absolutely necessary to run this application, the official RHEL approach would be to containerize, but you would still need to provide a working glibc, which wouldn't be possible with stock CentOS 7.

As a last resort, install glibc in a nonstandard location

If this isn't viable, and as an absolute last resort, it is possible to install a newer version of glibc than 2.18 as that is 9 years old now and glibc has been updated for several vulnerabilities and I'm not sure off the top of my head if it will build with the version of make in CentOS 7, but any newer version should work as follows:

  • This can potentially affect the functionality of your computer so make sure you know what you are doing

You can build the version of glibc you require elsewhere on your server and add it to LD_LIBRARY_PATH for the application. Note this must only be done for the application only.

wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxvf glibc-2.18.tar.gz
cd glibc-2.18
mkdir build
cd build
../configure --prefix=/opt/glibc-2.18
make -j4
sudo make install

Then to run a binary you need to use patchelf to update its interpreter

patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 program_you_are_running

And you need to enable it to find the new glibc library, either by

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.18/lib

Or you can use patchelf to update the binary's rpath (you can combine this with the previous pathelf command)

patchelf --set-rpath /opt/glibc-2.18/lib:/usr/lib64 program_you_are_running

If you change LD_LIBRARY_PATH don't export it for the whole system because all the binaries unmodified by patchelf will segfault.

/opt is the standard place to install third-party applications and libraries but you can use any path away from the system paths.

2 of 3
4

In the end,I did not have to upgrade GLIBC. The gdc-client tool I downloaded through R seemed to be for Ubuntu and not CentOS, though I did it on CentOS 7. I then downloaded the gdc-client for CentOS and it worked fine.

Discussions

Am I doing things wrong, or is CentOS 7's GLIBC really old?
No, you're not doing things wrong. CentOS is an enterprise class distribution, and as such, favors long-term stability over a long period of time, since that is what large enterprises require. CentOS basically maintains the same package version thru the lifetype of that release series, only backporting bugfix, security, or features when necessary. Since CentOS 7.0 was released in 2014, you have a glibc version from 2014. However, CentOS 8 will be released "real soon now" (for various values of soon). More on reddit.com
🌐 r/CentOS
23
9
August 29, 2019
centos7 - Upgrade glibc 2.17 to 2.19+ on CentOS 7 - Stack Overflow
3.0.4, ok checking if gcc -B/usr/bin/ ... file for required versions. Help me Please. ... Save this answer. ... Show activity on this post. Take a look at this thread. There is a workaround for this problem, basically by cheating Dropbox to think that the glibc version is 2.19, when ... More on stackoverflow.com
🌐 stackoverflow.com
Chrome 95 on CentOS 7.9 - Unix & Linux Stack Exchange
I have a medium size Selenium grid with nodes based on CentOS 7.9 (a couple hundred nodes). Using yum-cron, the nodes are updating their browser version daily (the requirement is to target the latest browser). This morning, chrome 95 could not be installed, because it has dependency on glibc 2.18, ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
linux - Building and using a newer GLIBC on CentOS 7 - Stack Overflow
I use CentOS 7 and would like to use some Anaconda python package that requires GLIBC_2.18 while the host OS only provides 2.17. I tried compiling a newer version of glibc myself following these More on stackoverflow.com
🌐 stackoverflow.com
🌐
Bits and Dragons
bitsanddragons.wordpress.com › 2020 › 08 › 26 › glibc_2-25-compile-on-centos-7-8
GLIBC_2.25 compile on CentOS 7.8 | Bits and Dragons
September 9, 2020 - This is just a recipe. I previously had issues with GLIBC, now on my current CentOS 7.8 I can't update it via yum anymore. This is my (simple) recipe: wget https://ftp.gnu.org/gnu/glibc/glibc-2.25.tar.gztar -xvzf glibc-2.25.tar.gzcd glibc-2.25/mkdir buildcd build/../configure --prefix=/opt/local/glibc-2.25/make -j8make install Of course after that we need to add it to LD_LIBRARY_PATH.
🌐
Matteoferla
blog.matteoferla.com › 2022 › 11 › glibc-236-vs-centos-7-tale-of-failure.html
glibc 2.36 vs. CentOS 7: a tale of failure
November 20, 2022 - This is a rather common situation unfortunately. This is a problem for an increasing number of Python packages with C-bindings as the system glibc (GNU library for C) is version 2.17, which cannot be updated or circumvented to the best of my knowledge as discussed here.
🌐
Itayemi
itayemi.com › blog › 2023 › 03 › 01 › upgrading-rhel-centos-v-7-x-to-glibc-version-2-20
Upgrading RHEL/CentOS v 7.x to GLIBC version 2.20 | Illumination
Background: the latest version of GLIBC from RHEL/CentOS for v7.7 is glibc-2.17. Some software require newer version (2.18 or newer).
🌐
Reddit
reddit.com › r/centos › am i doing things wrong, or is centos 7's glibc really old?
r/CentOS on Reddit: Am I doing things wrong, or is CentOS 7's GLIBC really old?
August 29, 2019 -

I am trying to run an executable that is an official binary release from an open-source project, but I get the dreaded

> version `GLIBCXX_3.4.20' not found

The machine is running CentOS 7.6.1810, but when I do a

> strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

it only goes up to GLIBCXX_3.4.19.

Isn't that a really old glibc version? This site ( https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html ) suggests GLIBCXX_3.4.19 corresponds to GCC 4.8.3, which was released in 2014.

🌐
Remi's RPM Repository
rpms.remirepo.net › rpmphp › zoom.php
Packages in Fedora / RHEL / CentOS / EPEL - Package: glibc
Show more informations from pkgdb · The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community maintained site. Red Hat is not responsible for content
🌐
GitHub
github.com › liuliping0315 › glibc2.28_for_CentOS7
GitHub - liuliping0315/glibc2.28_for_CentOS7 · GitHub
this sysroot was compiled by ct-ng on CentOS7.9 glibc 2.28 was compiled with 3.10 kernel patchelf is 0.15 my system version: CentOS Linux release 7.9.2009 my kernel: 3.10.0-1160.el7.x86_64
Starred by 36 users
Forked by 2 users
Find elsewhere
🌐
GitHub
gist.github.com › carlesloriente › ab3387e7d035ed400dc2816873e9089e
Compile and install GLIBC 2.18 in CentOS 7 · GitHub
Compile and install GLIBC 2.18 in CentOS 7. GitHub Gist: instantly share code, notes, and snippets.
🌐
Stack Exchange
unix.stackexchange.com › questions › 673978 › chrome-95-on-centos-7-9
Chrome 95 on CentOS 7.9 - Unix & Linux Stack Exchange
Using yum-cron, the nodes are updating their browser version daily (the requirement is to target the latest browser). This morning, chrome 95 could not be installed, because it has dependency on glibc 2.18, which I understand will never be available ...
🌐
Centos
lists.centos.org › hyperkitty › list › discuss@lists.centos.org › thread › ODMDTUUWZPQ7CUGVY2DIYBNIAHXRAFT3
install older version of glibc package - Discuss - lists.centos.org
===================================== ... mirrors.netdna.com * rpmforge: apt.sw.be * updates: yum.singlehop.com Installed Packages Name : glibc Arch : i386 Version : 2.5 Release : 49.1 Size : 22 M Repo : installed Summary : The GNU libc libraries....
🌐
Liquid Web
liquidweb.com › home › how to check the glibc version on centos
How to Check the glibc Version on CentOS | Liquid Web
August 26, 2024 - Loaded plugins: fastestmirror, langpacks, priorities Loading mirror speeds from cached hostfile 3 packages excluded due to repository priority protections Installed Packages glibc.x86_64 2.17-55.el7_0.3 @system-updates-released Available Packages ...
🌐
GitHub
github.com › jruby › jruby › issues › 7579
GLIBC compatibility with RHEL/CentOS 7 and JRuby 9.4.0.0 · Issue #7579 · jruby/jruby
January 12, 2023 - RHEL/CentOS 7 ships with GLIBC 2.17. Is it possible to support older builds of GLIBC with future builds of JRuby 9.4? It would be great to use the features of MRI Ruby 3.1. ... afaris:jruby-9.4.0.0 $ ./bin/jruby --version jruby 9.4.0.0 (3.1.0) ...
Author   jruby
🌐
Ngelinux
ngelinux.com › home › how to install glibc package version 2.28+ on rhel 7 unofficially for testing purposes?
How to install glibc package version 2.28+ on RHEL 7 unofficially for testing purposes? | New Generation Enterprise Linux
June 22, 2022 - The correct way is to build the package using below steps, however this seems to not work on RHEL 7 or CentOS 7 · [user@ngelinux001 ~]$ wget http://gnu.bardia.tech/gnu/libc/glibc-2.28.tar.gz –2022-05-12 00:46:17– http://gnu.bardia.tech/gnu/libc/glibc-2.28.tar.gz Resolving gnu.bardia.tech (gnu.bardia.tech)…