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 › 593171 › is-there-a-glibc-compat-or-equivalent-for-centos-8
compatibility - Is there a glibc-compat or equivalent for CentOS 8? - Unix & Linux Stack Exchange
I'm 100% sure that either our use of Pth, or Pth itself, is dependent upon a bug or an incompatible change introduced into glibc between version 2.17 (on CentOS 7, which works fine) and 2.27 (on Ubuntu 18.04, which breaks our software). The problem is extremely pernicious to debug, even with full source code and debug symbols, because Pth's operating model constantly clobbers the stack, making it difficult to tell how the program got to a particular failure mode. I have isolated the problem to the glibc version, and have also tried it on CentOS 8, which uses glibc 2.28.
🌐
Stack Overflow
stackoverflow.com › questions › 17388612 › how-to-update-glibc-2-17-in-centos
glibc - How to update GLIBC_2.17 in CentOS - Stack Overflow
Then I looked for glibc_2.17 and Fedora and found this link http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/libc.so.6(GLIBC_2.17)(64bit)the and RPM for Fedora labeled 'other' which was this glibc-2.17-4.fc19.src.rpm. My intent with the link was not any plug, just a reference for the one I downloaded. I clicked on the fedora glibc link and after a few clicks had it in my Download folder. I did the following and my depencency was resolved. $ sudo user mockbuild $ sudo groupadd mockbuild groupadd: group 'mockbuild' already exists // I happened to already have it $ sudo rpm -ivh glibc-2.17-4.fc19.src.rpm warning: glibc-2.17-4.fc19.src.rpm: Header V3 RSA/SHA1 Signature, key ID ba094068: NOKEY 1:glibc ########################################### [100%]
Discussions

Release centos7 compatible binaries
Additional information: First things first, Centos 7 is based on RHEL 7, as one may know. And, according to redhat.com: In Red Hat Enterprise Linux 7, the glibc libraries (libc, libm, libpthread, NSS plug-ins, and others) are based on the glibc 2.17 release · Replacing system glibc is a very bad idea, basically because all binaries on the system are compatible with specific glibc version. So, that's not an option. However, the RHEL 8 ... More on github.com
🌐 github.com
52
February 2, 2019
centos7 - Deno on CentOS 7: 'GLIBC_2.18' not found - Stack Overflow
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... More on stackoverflow.com
🌐 stackoverflow.com
glibc - Compiling on CentOS 8 for CentOS 7 - Stack Overflow
The only thing I noticed is version of glibc on CentOS 8 is 2.28 and the version on CentOS7 is 2.17. Could that be causing it? Will I have to compile a separate CentOS 7 and CentOS 8 binary? 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
🌐
Server Fault
serverfault.com › questions › 1042653 › installing-the-elrepo-repository-on-centos-8-ends-with-glibc-2-17-is-needed
centos8 - installing the ELRepo repository on centos 8 ends with "glibc = 2.17 is needed" error - Server Fault
i'm trying to upgrade centos 8.2 kernel from 4.x to 5.x to resolve the network latency issue caused by network interface driver (TCP packet incompatibilty). ... Retrieving https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm | error: Failed dependencies: glibc = 2.17 is needed by elrepo-release-7.0-3.el7.elrepo.noarch
🌐
GitHub
github.com › denoland › deno › issues › 1658
Release centos7 compatible binaries · Issue #1658 · denoland/deno
February 2, 2019 - However, the RHEL 8 Beta is using glibc 2.28 (source), but Centos 8 will only be released when the stable version of RHEL 8 will be released (source), so updating Centos is not an option right now.
Author   denoland
🌐
Red Hat
access.redhat.com › discussions › 3244811
Red Hat Customer Portal - Access to 24x7 support and knowledge
[root@srrmdilm2usb202 ~]# yum info glibc-devel.x86_64 Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager Installed Packages Name : glibc-devel Arch : x86_64 Version : 2.17 Release : 196.el7 Size : 1.0 M Repo : installed From repo : rhel-7-server-rpms Summary : Object files for development using standard C libraries.
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.

🌐
Pkgs.org
pkgs.org › download › glibc-common
Glibc-common Download for Linux (rpm)
CentOS 8 Stream · Fedora 36 · Fedora 35 · Fedora Rawhide · Rocky Linux 8 · glibc-common latest versions: 2.35.9000, 2.35, 2.34, 2.28, 2.26, 2.25, 2.17 · glibc-common architectures: aarch64, x86_64 ·
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

Find elsewhere
🌐
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
🌐
LinuxGSM
docs.linuxgsm.com › requirements › glibc
glibc | LinuxGSM_
glibc · CentOS 7 · 2.17 · CentOS 8 · 2.28 · Debian 9 · 2.24 · Debian 10 · 2.28 · Debian 11 · 2.31 · Ubuntu 16.04 LTS · 2.23 · Ubuntu 18.04 LTS · 2.27 · Ubuntu 20.04 LTS · 2.31 · distrowatch.com is also a great source to find this information.
🌐
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 - CONDA_OVERRIDE_GLIBC=2.36 conda ... This requires a compiled 2.36 glibc library. However, in the package distributions, there is not a glibc version greater than 2.17 availble for CentOS ......
🌐
Serverkurma
serverkurma.com › linux › how-to-update-glibc-newer-version-on-centos-6-x
How to Update glibc Newer Version on Centos 6.x – ServerKurma – Bilişim Hizmetleri
February 6, 2018 - GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 ... We can get soruce file in 2 ways, using git or ftp. You can get latest version from git. We need GLIBC_2.17 version for our centos ...
🌐
CentOS Repositories
centos.pkgs.org › 7 › centos-x86_64 › glibc-2.17-317.el7.i686.rpm.html
glibc-2.17-317.el7.i686.rpm - CentOS Repositories - pkgs.org
The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important ...
🌐
GitHub
gist.github.com › harv › f86690fcad94f655906ee9e37c85b174
update glibc to 2.17 for CentOS 6 · GitHub
If you are trying to do something with python that complains about requiring glibc over 2.12, consider using pip version 19 (pip install pip==19), it will use the manylinux2010 (based on Centos 6) wheels and may have c binaries for your system. If you are compiling c binaries that need glibc > 2.12 its better to install glibc in a seperate folder and use PATH (LD_LIBRARY_PATH=/opt/glibc-2.17/lib)to link to it instead
🌐
GitHub
github.com › sdwru › glibc-centos-8
GitHub - sdwru/glibc-centos-8: glibc for Centos v8 including 2.6.32 kernel compatibility as required when using OpenVZ v6. The master and release branches track official source and the custom branches contain the changes. https://github.com/sdwru/glibc-centos-8/releases contains an OVZ6 template and the compiled RPM packages · GitHub
glibc for Centos v8 including 2.6.32 kernel compatibility as required when using OpenVZ v6. The master and release branches track official source and the custom branches contain the changes. https://github.com/sdwru/glibc-centos-8/releases contains ...
Author   sdwru
🌐
CentOS Repositories
centos.pkgs.org › 7 › centos-x86_64 › glibc-2.17-307.el7.1.x86_64.rpm.html
glibc-2.17-307.el7.1.x86_64.rpm CentOS 7 Download
The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important ...