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

centos7 - Deno on CentOS 7: 'GLIBC_2.18' not found - Stack Overflow
How to run Deno on Webfaction's CentOS 7 (64-bit)? It gives an error: deno: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by deno) More on stackoverflow.com
🌐 stackoverflow.com
GLIBC 2.18 requirement causes incompatibility with CentOS 7
Greetings! It appears that the Linux build of ripgrep for VSCode is happening in an environment with GLIBC 2.18. This results in a binary incompatible with operating systems with a lower GLIBC version. CentOS 7 ships with GLIBC 2.17 and ... More on github.com
🌐 github.com
3
August 16, 2022
How to solve GLIBC version incompatible issue?
You need to build deno from source on a system that uses glibc_2.18. They have a guide to build it here: https://deno.land/manual@v1.29.3/references/contributing/building_from_source More info? https://github.com/denoland/deno/issues/1658 More on reddit.com
🌐 r/HPC
5
5
January 17, 2023
linux - Redhat/CentOS - `GLIBC_2.18' not found - Stack Overflow
What is the process of installing/setting GLIBC_2.18 on Centos/Redhat servers? ... You can upgrade to the Red Hat Enterprise Linux 8, which comes with glibc 2.28 and thus provides the GLIBC_2.18 symbol version (and much more). If you do not want to upgrade, you need a Redis build for Red Hat Enterprise Linux 7... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
gist.github.com › hoai › 5a470586ac77984dcdd17864fee3c318
Compile and install GLIBC 2.18 in CentOS 7 - Gist - GitHub
Compile and install GLIBC 2.18 in CentOS 7. GitHub Gist: instantly share code, notes, and snippets.
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 › microsoft › vscode-ripgrep › issues › 34
GLIBC 2.18 requirement causes incompatibility with CentOS 7 · Issue #34 · microsoft/vscode-ripgrep
August 16, 2022 - It appears that the Linux build ... incompatible with operating systems with a lower GLIBC version. CentOS 7 ships with GLIBC 2.17 and is one such incompatible OS....
Author   microsoft
🌐
Reddit
reddit.com › r/hpc › how to solve glibc version incompatible issue?
r/HPC on Reddit: How to solve GLIBC version incompatible issue?
January 17, 2023 -

The following error is throwed when I run deno on a Centos 7 hpc cluster,

/lib64/libc.so.6: version `GLIBC_2.18' not found

Most solutions I found on the internet is either use container or some complicated setup. I know that I could workaround this problem by building a singularity container. But I am just wondering is there any easier way to fix this problem, for example, by creating a environment module to override the default libc.so?

Find elsewhere
🌐
GitHub
github.com › denoland › deno › issues › 1658
Release centos7 compatible binaries · Issue #1658 · denoland/deno
February 2, 2019 - When trying to run deno on Centos 7, it fails: [maxim@maxim deno] $ target/release/deno tests/worker.js target/release/deno: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by target/release/deno) Additional information: First...
Author   denoland
🌐
GitHub
github.com › pantsbuild › pants › issues › 5240
native-engine requires glibc 2.18, but Centos 7 only has 2.17 · Issue #5240 · pantsbuild/pants
December 22, 2017 - native-engine requires glibc 2.18, but Centos 7 only has 2.17#5240 · Copy link · Labels · bug · shanmugh · opened · on Dec 22, 2017 · Issue body actions · Similar to issue #4541 the release 1.4.0-dev23 also seems to have been built on ...
Author   pantsbuild
🌐
Google Groups
groups.google.com › g › discuss-webrtc › c › y81rZPO3KG4
Building on Centos 7
Centos 7 is on glibc 2.17, and there doesn't appear to be any way to upgrade it without going to Centos 8, which nobody wants to do since Centos 7 even though end-of-life'd will be supported a lot longer that Centos 8. (If I've got that story right). I saw a comment in third_party/perfetto...
🌐
Intel Community
community.intel.com › t5 › Intel-Fortran-Compiler › Intel-Fortran-Compiler-2024-2-for-CentOS-7-with-glibc-2-17 › td-p › 1611495
Intel Fortran Compiler 2024.2 for CentOS 7 with glibc 2.17 - Intel Community
July 5, 2024 - After upgrading the Intel HPC Toolkit to the latest release 2024.2.0 on our Linux development server which runs CentOS 7 it turned out that the Intel Fortran Compiler 2024.2.0 now requires glibc 2.28: /opt/intel/oneapi/compiler/2024.2/bin/compiler/xfortcom: /lib64/libc.so.6: version `GLIBC_2.18' ...
🌐
Red Hat
access.redhat.com › solutions › 3643072
Is Upgrading to glibc2.18 Supported? - Red Hat Customer Portal
For development purposes, you wish to upgrade to upstream version of glibc-2.18. This version of glibc is not currently available for RHEL-7.
🌐
Microsoft Community Hub
techcommunity.microsoft.com › microsoft community hub › communities › products › microsoft edge insider › discussions
Latest updates fail on CentOS 7 | Microsoft Community Hub
April 13, 2021 - I have been running Edge (dev) on all of our CentOS 7 workstations and many servers for quite a while and been happy with the operation. Unfortunately the developers have updated it to require glibc 2.18 which now makes it incompatible with Centos 7, and I suspect all of the other RHEL7 ...
🌐
Pkgs.org
pkgs.org › download › libc.so.6(GLIBC_2.18)(64bit)
Libc.so.6(GLIBC_2.18)(64bit) Download for Linux (rpm)
Download libc.so.6(GLIBC_2.18)(64bit) linux packages for AlmaLinux, ALT Linux, Amazon Linux, CentOS, Fedora, Mageia, OpenMandriva, openSUSE, PCLinuxOS, Rocky Linux · Filter: Distros: all Arches: arm intel Types: official thirdparty · AlmaLinux 9 · AlmaLinux 8 · ALT Linux P10 · ALT Linux P9 · ALT Linux Sisyphus · Amazon Linux 2 · CentOS 8 · CentOS 7 ·
🌐
Google Groups
groups.google.com › d › topic › kivy-users › HybMj6cCQ_M
Installing glibc 2.18 in cent os 7
September 23, 2019 - how do you install glibc 2.18 in centos 7.. please · unread, Sep 24, 2019, 5:48:45 AM9/24/19 ·  ·  ·  · Reply to author · Sign in to reply to author · Forward · Sign in to forward · Delete · You do not have permission to delete messages in this group ·
🌐
GitHub
github.com › coder › code-server › issues › 1742
`GLIBC_2.18' not found error (Centos7 with GLIBC 2.17), terminal and extensions not working · Issue #1742 · coder/code-server
May 28, 2020 - Hi although on the release it says that this bug was fixed, that's not the case. On standard and updated Centos7 (coming with glibc 2.17 only), code-server 3.4.0 wrongly says it needs 2.18.
Author   coder