For glibc:

/lib/libc.so.6

Sounds maybe strange to run a so file but should print out version information in this case

For the kernel version use uname

For the binutils parsing the output of ld --versionmight yield what you expect, the same for gcc --version. This is a bit tedious but I do not know another way.

Answer from jdehaan on Stack Overflow
๐ŸŒ
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 - In this case, version 2.17 is installed. ... 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
Discussions

compiling - Check the actual glibc version used - Unix & Linux Stack Exchange
I want check the glibc version used by toolchain to build code for the target system (ARM). In toolchain directory I tried strings /sysroot/lib/libc.so.6 | grep GLIBC the output is GLIBC_2.4 GL... More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
August 23, 2019
c - Check glibc version for a particular gcc compiler - Stack Overflow
I have two gcc compilers installed on my system, one is gcc 4.1.2 (default) and the other is gcc 4.4.4. How can I check the libc version used by gcc 4.4.4, because /lib/libc.so.6 shows the glibc us... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to check glibc version?

ldd --version

More on reddit.com
๐ŸŒ r/MXLinux
4
3
September 27, 2022
Running into a version `GLIBC_2.38' not found error
The program is too new for the distro. You're correct not to just "upgrade glibc". This is an integral part of the OS and difficult/impossible to do reliably. You could try running the program in a Distrobox using a distro which has a newer glibc, probably Fedora or Arch will work. You could wait until Kubu 24.04 and try there. It's already April so you could probably install the beta now and update to the full version when it comes out in a few weeks. More on reddit.com
๐ŸŒ r/linux4noobs
22
7
April 7, 2024
๐ŸŒ
OpenGenus
iq.opengenus.org โ€บ find-glibc-version
Find glibc version in your system
In this guide at OpenGenus, we present 3 different ways to identify compile time and run time version of glibc. The version of glibc has two components: Major version and Minor version.
๐ŸŒ
Linux Questions
linuxquestions.org โ€บ questions โ€บ linux-software-2 โ€บ how-to-check-glibc-version-263103
how to check glibc version? - Linux
December 6, 2004 - hi, any method to check glibc version using in my linux box? anyone have idea on this? thanks, jim
๐ŸŒ
UMA Technology
umatechnology.org โ€บ home โ€บ how to check the glibc version on centos
How to Check the glibc Version on CentOS - UMA Technology
December 18, 2024 - To check the glibc version on CentOS, use the command "rpm -q glibc" in the terminal.
๐ŸŒ
Oreate AI
oreateai.com โ€บ blog โ€บ unlocking-your-linux-system-a-friendly-guide-to-checking-your-glibc-version โ€บ 4d40ad7b9a24cbe0325197722a95765d
Unlocking Your Linux System: A Friendly Guide to Checking Your Glibc Version - Oreate AI Blog
February 25, 2026 - This is often the go-to command for many, and for good reason. Open up your terminal, type ldd --version, and hit Enter. You'll likely see output similar to this: ldd (GNU libc) 2.31.
Find elsewhere
๐ŸŒ
Xmodulo
xmodulo.com โ€บ check-glibc-version-linux.html
How to check glibc version on Linux
July 9, 2020 - A simple command-line to check the version of the GNU C library is as follows. ... In this example, the version of glibc is 2.19.
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.

๐ŸŒ
XeonBD
xeonbd.com โ€บ home โ€บ blog โ€บ how to check the glibc (gnu libc) version on centos 6 and centos 7
How to Check the glibc (GNU libc) Version on CentOS 6 and CentOS 7
January 29, 2015 - In this case, version 2.17 is installed. ... 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
๐ŸŒ
Benohead
benohead.com โ€บ home โ€บ linux: check the glibc version
Linux: Check the glibc version - Benohead's Software Blog
January 28, 2015 - This post describes a few methods to determine the glibc version used on a Linux server using the command line or a C program.
๐ŸŒ
LinuxVox
linuxvox.com โ€บ blog โ€บ linux-get-glibc-version
Linux: How to Get the GLIBC Version โ€” linuxvox.com
The ldd (list dynamic dependencies) command is a widely used tool to list the shared libraries that a program depends on. You can use it to get the GLIBC version by checking the version of the libc.so library.
๐ŸŒ
Linode
linode.com โ€บ docs โ€บ guides โ€บ patching-glibc-for-the-ghost-vulnerability
Upgrading glibc for the GHOST Vulnerability | Linode Docs
May 3, 2021 - On CentOS 7 systems, versions of glibc before glibc-2.17-55.el7_0.5 are vulnerable, and on CentOS 6 versions before glibc-2.12-1.149.el6_6.5. The original security advisory for CVE-2015-0235 included the following code to test for the vulnerability. This method requires that you have gcc installed on your system. If you donโ€™t, you can install it from your package manager, or use the alternate check above.
๐ŸŒ
Gordano
gordano.com โ€บ home โ€บ knowledge base โ€บ gms โ€บ how do i tell which version of glibc i have installed on my system?
How do I tell which version of glibc I have installed on my system? โ€“ GMS
On non RPM based Linux systems, please open a command prompt and change to the /lib directory then type "ls -al /lib/libc*". This will return a list of glibc files on your system including version numbers.
๐ŸŒ
DEV Community
dev.to โ€บ 0xbf โ€บ how-to-get-glibc-version-c-lang-26he
How to get glibc version - C Lang - DEV Community
April 27, 2020 - The easiest way is to use ldd command which comes with glibc and in most cases it will print the same version as glibc:
๐ŸŒ
TechBloat
techbloat.com โ€บ home โ€บ how to check glibc version
How to Check Glibc Version - TechBloat
March 1, 2026 - ... If the package is not installed or the command yields no output, Glibc may not be present or installed under a different package name. ... Use dpkg -s libc6 | grep Version on Debian-based systems. Use rpm -q glibc on RPM-based systems. These commands provide a quick, reliable way to check ...
๐ŸŒ
UMA Technology
umatechnology.org โ€บ home โ€บ how to check glibc version in linux
How to Check Glibc Version in Linux - UMA Technology
March 1, 2026 - This command displays the installed Glibc version alongside other relevant information. Alternatively, you can use: rpm -q glibc # for RPM-based distros like CentOS or Fedora
๐ŸŒ
LinuxConfig
linuxconfig.org โ€บ home โ€บ check libc version
Check and Update libc Version on Linux
September 22, 2025 - The process for checking your installed version of libc will be the same regardless of your Linux distro. Simply use the ldd command as seen below. $ ldd --version ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35 ...