<tutorialjinni.com/>

Latest glibc version for rhel 7

Posted Under: Configuration, Linux, Tutorials on Mar 21, 2024
The GNU C Library, also known as glibc, is one of the most critical components of most modern Linux distributions as it provides the system calls and functions necessary for the kernel to interact with user space applications. The upgrade of glibc is not a trivial task as the operating system’s stability and functionality depend on it. This tutorial provides you with the steps to install the latest version of glibc on CentOS 7.

Before you install, please make sure you have a backup of any critical data or configuration information, as updating core libraries can lead to compatibility issues with older software.

Steps to Installation:

Step 1: Install The Development Tools Start off by updating your existing list of packages and install the Development Tools package. Run the command as follows:
yum group install "Development Tools" -y
Step 2: Install CentOS Software Collections (SCL) Release package We need this package to gain access to newer versions of software. Run the following command
yum install centos-release-scl-rh -y
Step 3: Install Development Tools Set-11 This package will give us access to use glibc's binaries. Install it by entering the following command:
yum install devtoolset-11* -y
Step 4: Adjust $PATH for DevToolset We need to adjust our $PATH to include the path to the binaries we just installed.
export PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH
Step 5: Adding IUS Repository Before we can install Python3, we need to add the IUS repository. This is done by running the following command:
sudo yum install https://repo.ius.io/ius-release-el7.rpm
Step 6: Update System and Install Python3 & wget Now we will update the system, and install Python 3 and wget which will be used in later steps.
sudo yum update
sudo yum install -y python3 wget
Step 7: Downloading GLIBC Source Code Here we download the source code for the latest version of GLIBC.
# download latest version of glibc
wget https://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.gz
Step 8: Extracting the GLIBC Package Once we have downloaded the source code, we can extract the package using the following command:
tar zxvf glibc-2.34.tar.gz
cd glibc-2.34
Step 9: Configuring and Building GLIBC In this step, we'll configure and build the package.
mkdir build
cd build/
../configure --disable-sanity-checks
sudo make
Step 10: Installing GLIBC Finally, after building, we can install the package with the following command:
sudo make install

Verify Installation:

To verify that the glibc has been successfully installed and is the expected version, you can use the ldd command:
ldd --version
Now you have successfully installed the latest version of GLIBC on CentOS 7. Make sure to test all your applications for any compatibility issues as glibc is a critical part of the system.


imgae