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.
Release centos7 compatible binaries
centos7 - Deno on CentOS 7: 'GLIBC_2.18' not found - Stack Overflow
glibc - Compiling on CentOS 8 for CentOS 7 - Stack Overflow
centos7 - rpm glibc Centos 7 - Stack Overflow
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.
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
You can upgrade all the packages at the same time, using a command like this one:
sudo rpm -U glibc-2.17-317.el7.x86_64.rpm glibc-common-2.17-317.el7.x86_64.rpm
Or you can use yum update, like this:
sudo yum update --disablerepo="*" *.rpm
This has the advantage that packages not installed are not automatically installed by the upgrade (unless dependencies require it). --disablerepo="*" ensures that yum update does not try to download anything.
jlehtone in forums.centos.org solved my situation. I just needed to write
sudo rpm -i glibc-2.17-292.el7.i686.rpm nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm nspr-4.25.0-2.el7_9.i686.rpm nss-util-3.53.1-1.el7_9.i686.rpm
Link to forums.centos.org
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.
You need to download the following 4 packages from a mirror:
- glibc-2.17-55.el7.i686.rpm
- glibc-2.17-55.el7.x86_64.rpm
- glibc-common-2.17-55.el7.x86_64.rpm
- glibc-headers-2.17-55.el7.x86_64.rpm
After doing so, issue a rpm -ivh glibc-*. If that fails, download:
- glibc-devel-2.17-55.el7.i686.rpm
- glibc-devel-2.17-55.el7.x86_64.rpm
and reissue the command again. After getting glibc updated, issue a yum update to resolve any new dependencies.
If you have glibc 2.12 installed, you do NOT have CentOS7; you're on CentOS6. While there's been a lot of grief about the locking of major/minor versions after distro release - it's for stability, testing and certification; you'll learn the value later - the version you're looking at should not exist under an up-to-date centos7.
Update your CentOS7, do a yum install of apr (apr-devel too?) and you're done.
If you DO have CentOS6, apr-1.3.9-5.el6_2.x86_64 requires glibc-2.12 . Yum install will get you what you need here, as well.
In general
- Don't mix RPMs from alient repositories: you're looking for pain.
- Don't mix RPMs from two different distro releases -- they're designed to work together, and tested so.
- if it's suddenly hard, or there are strange messages, there's a really good chance you're doing something you should not.
- Dependency Hell [tm] is self-inflicted. No exceptions.
I worked at a distro; not in Support but adjacent to it. #4 is a well-tested theory.