The GNU C Library (GLIBC) is the GNU implementation of the standard C library. GLIBC is a key component of the GNU tool chain for use with binary tools and compilers to generate user-space applications for the target schema.
Some Linux programs may need to be linked to a specific version of GLIBC when building from the source code. In this case, you may want to check the installed GLIBC information to see if the dependencies are met.
Here are a few easy ways to check the glibc version on Linux.
Method One
Below is a simple command to check the GNU C library under the command line.
The code is as follows:
$ LDD--version
In this case, the GLIBC version is 2.19.
Method Two
Another method is to "type" the name of the GLIBC library (for example, libc.so.6) on the command line, just like a command.
The output will show more detailed information about the GLIBC library, including the GLIBC version and the GNU compiler used, as well as information on glibc extensions. The location of the GLIBC variable depends on the Linux version and the processor architecture.
On a 64-bit system based on Debian:
The code is as follows:
$/lib/x86_64-linux-gnu/libc.so.6
On a 32-bit system based on Debian:
The code is as follows:
$/lib/i386-linux-gnu/libc.so.6
On a 64-bit system based on Red Hat:
The code is as follows:
$/lib64/libc.so.6
On a 32-bit system based on Red Hat:
The code is as follows:
$/lib/libc.so.6
The following figure is an example of the output of an input glibc library.