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.
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.
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.
centos7 - Deno on CentOS 7: 'GLIBC_2.18' not found - Stack Overflow
GLIBC 2.18 requirement causes incompatibility with CentOS 7
How to solve GLIBC version incompatible issue?
linux - Redhat/CentOS - `GLIBC_2.18' not found - Stack Overflow
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.
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
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?
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. Red Hat provides a Software Collection with Redis 3.2 (available in the scl channels). There is also a CentOS build of Redis 3.2, again as a software collection. If that version is too old, you will have to build Redis from source. EPEL only contains Redis 3.2 as well.
Upgrading glibc within a current release in Red Hat Enterprise Linux (or CentOS) is not possible.
The root cause of make fails to remove its temporarily created files is due to fact that Windows and its WSL uses case-insensitive FS.
Use fsutil on windows and attr(getfattr/setfattr) on linux to change case sensitivity.
webrtc-checkout/src/buildtools/linux64/gn: /lib64/libc.so.6: version 'GLIBC_2.18' not found
This error means that gn has been built on a GLIBC-2.18 (or later) system, and requires GLIBC-2.18 to run.
Any pointers on how I can resolve this without upgrading the glibc version
You can build gn from source on your system.
Alternatively, you may be able to install glibc-2.18 or above as a second glibc, without upgrading the "main" glibc. This answer provides details.
Seems like it was a bug in chromium buildtools which was resolved (https://chromium-review.googlesource.com/c/chromium/buildtools/+/595110). I was able to update and it fixed my issue.
glibc is the C standard library, which provides bindings to the most low-level operating system calls for virtually every program on your system. It is generally not possible to replace it without also recompiling every program on the system. Back in the late 1990s and early 2000s, some Linux distributions did experiment with upgrading glibc in place. The result was always broken, unbootable systems. So nobody tries that anymore. This is why you've been advised to containerize the application which requires a newer version of glibc. On that note, we're all waiting impatiently for the long overdue RHEL 8....
In short: You can't!
longer answer: as glib is a core part of the whole system, you have to rebuild-recompile whole distribution with a new version of glibc and then reinstall. Attempts to replace glibc on "live system" are known to fail leading to non-booting system.