Showing results for centos 7 glibc
Search instead for centos7 glibc

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
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.

🌐
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.

Discussions

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
centos7 - Upgrade glibc 2.17 to 2.19+ on CentOS 7 - Stack Overflow
First of all, Dropbox emailed me saying that I must upgrade glibc to 2.19+, otherwise Dropbox will not run.Then I follow the steps below to upgrade glibc. More on stackoverflow.com
🌐 stackoverflow.com
centos7 - rpm glibc Centos 7 - Stack Overflow
How can I install both of them on CentOS 7? They both depend on each other. The machine is not connected to the internet. [efe@localhost Desktop]$ sudo rpm -i glibc-2.17-317.el7.x86_64.rpm warning: More on stackoverflow.com
🌐 stackoverflow.com
package management - Cannot update glibc on CentOS 7 - Unix & Linux Stack Exchange
I have CentOS 7 installed. I want to install the APR package for Apache, and I'm told I cannot install it because it requires at least glibc.2.14 while I have glibc.2.12 installed. I have downloade... More on unix.stackexchange.com
🌐 unix.stackexchange.com
🌐
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.
🌐
The Linux Cluster
thelinuxcluster.com › 2023 › 06 › 30 › compiling-glibc-2-29-at-centos-7
Compiling glibc-2.29 at CentOS-7 – The Linux Cluster
July 9, 2023 - Step 1: Download the glibc To Download the glibc-2.29, do download at https://ftp.gnu.org/gnu/glibc/ Step 2: Compile and Build the glibc libraries # tar zxvf glibc-2.29.tar.gz # cd glibc-2.29 # mkdir build # cd build Step 3: Compile and install ...
🌐
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 - For example, HTCondor was CentOS 7 only: CentOS Stream 9 is not an option supported by HTCondor, but Ubuntu and Rocky Linux are. 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
Install required packages: ...entos.org/centos/7/os/x86_64/Packages/libstdc++-static-4.8.5-44.el7.x86_64.rpm · – Make sure the DVD ISO is attached to the VM and mounted as yum will install dependencies from it: [root@rhel77c ~]# mount /dev/cdrom /mnt · Install the packages that were just downloaded (above): [root@rhel77c ~]# yum install -y gd* libstdc* Download the glibc-2.x source ...
Find elsewhere
🌐
Tenable
tenable.com › plugins › nessus › 200256
CentOS 7 : glibc (RHSA-2024:3588)<!-- --> | Tenable®
June 10, 2024 - Required KB Items: Host/local_checks_enabled, Host/CentOS/release, Host/CentOS/rpm-list, Host/cpu ... Metasploit (CosmicSting: Magento Arbitrary File Read (CVE-2024-34102) + PHP Buffer Overflow in the iconv() function of glibc (CVE-2024-2961))
🌐
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.
🌐
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 glibc.i686 2.17-55.el7_0.3 system-updates-released
🌐
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 - CentOS or RHEL does not officially support this and provides glibc version 2.17 as official version. Since these packages affect the core OS, upgrading unofficial version makes your OS out of support.
Top answer
1 of 2
6

Current Deno release 1.0.0 (latest today) is not compatible with CentOS 7.

I tried on the latest distribution released on 27 April 2020:

$ cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)

This issue 7 GLIBC_2.18 not found suggests that there should be a way to solve this problem, but the thread seems to be abandoned for a year.

As of today Deno requires GLIBC_2.18, but unfortunately CentOS 7 is running 2.17, an old version of the gclib which is not enough:

$ ldd --version
ldd (GNU libc) 2.17

If you need to run Deno on CentOS you'll need to use CentOS 8. Tested it and it works.

From How to fix “/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found”:

That means the program was compiled against glibc version 2.14, and it requires that version to run, but your system has an older version installed. You'll need to either recompile the program against the version of glibc that's on your system, or install a newer version of glibc (the "libc6" package in Debian).

It will not happen for CentOS 7. From glibc_2.18 on Centos 7:

No. Never going to happen. We ship glibc 2.17 as part of CentOS 7 and that will never change. It's part of the basic RHEL standards that stuff like this does not change within a major version.

I wouldn't count on Deno — which is a new technology — to backport with old compilers. Consider upgrading your servers to CentOS 8.

2 of 2
1

For me, I have no way to upgrade the OS as it's managed by IT department. Seems there's a workaround. I found the link on the following thread does work.

https://github.com/denoland/deno/issues/1658#issuecomment-632986792

🌐
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
🌐
Earthdata Forum
forum.earthdata.nasa.gov › home
GLIBC problem is back... [CentOS 7 RIP] - Earthdata Forum
January 10, 2024 - CentOS7 is end of life in June. We no longer have (or are allowed to have) a CentOS7 machine, the "oldest" we have is RHEL8 (which is what V2023.3 was compiled on). Since it still works for you, you can continue to use V2023.2 or look to upgrade your server to an OS with a longer support cycle.