Before you get ready to upgrade the GLIBC library, you need to think about it,
Are you sure you want to upgrade glibc?
Do you know what you're doing?
GLIBC is the GNU published LIBC library, the C runtime library. GLIBC is the lowest-level API in a Linux system, and almost any other runtime relies on glibc. GLIBC In addition to encapsulating the system services provided by the Linux operating system, it also provides many other necessary functions for the implementation of the service ...
In general, not saying that some of the applications running on Linux, or the products you have previously deployed, are basic commands for Linux, such as CP, RM, LS, mv, SSH, SCP, and so on, and commands depend on it.
Many people on the internet have a painful lesson, the system after the failure of the majority of commands can not run, the system can not re-enter after the exit ...
For systems such as CentOS, for the sake of stability (this is debatable) is often a variety of library versions are very low, such as 6.5 or even 7.0 comes with the glibc2.12, and Ubuntu 14.04 with glibc2.19
The system I was experiencing is CentOS 5.9, and by looking at the discovery system comes with a glibc version of 2.5, and the program that was developed needs to be GLIBC version 2.11, so you have to manually upgrade glibc.
The first is to download glibc_2.12 compile installation, but install error, so try to download glibc_2.11 compile installation, or continue to error, by looking for data to get the result should be the system version is too low, do not support install too high version of glibc, so download glibc_ 2.10 of the compiled installation, the results were successful, However, the GLIBC version that cannot meet the requirements of the program reaches 2.11, there are two solutions: Modify the program code requires GLIBC version to 2.10 to run; replace the higher version of the CentOS system, recommended more than 6.3, with the glibc are 2.12.
First look at the first situation, under CentOS5.9
[Email protected] ~]# ll/lib64/libc.so.6
lrwxrwxrwx 1 root root 2014/lib64/libc.so.6-libc-2.5.so
[Email protected] ~]# strings/lib64/libc.so.6 |grep GLIBC
glibc_2.2.5
glibc_2.2.6
glibc_2.3
glibc_2.3.2
glibc_2.3.3
glibc_2.3.4
glibc_2.4
glibc_2.5
Glibc_private
Libc.so.6 is a soft connection, the current glibc is 2.5 version, the development of the program problem is glibc_2.7 and glibc_2.11 can not find the problem, so need to upgrade to at least 2.11, said before, 2.11 installation failed, so install 2.10
For the low version of GLIBC, there are glibc-linuxthreads-2.x need to compile, can refer to a lot of online documents, but 2.10 no, so no
[Email protected] ~]# wget http://ftp.gnu.org/gnu/glibc/glibc-2.10.1.tar.gz
[Email protected] ~]# wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.10.1.tar.gz
[Email protected] ~]# TAR-XVF glibc-2.10.1.tar.gz
[Email protected] ~]# TAR-XVF glibc-ports-2.10.1.tar.gz
[Email protected] ~]# MV glibc-ports-2.10.1 glibc-2.10.1/ports
[Email protected] ~]# mkdir glibc-build-2.10.1
[Email protected] ~]# CD glibc-build-2.10.1
[Email protected] ~]#. /glibc-2.10.1/configure--prefix=/usr--disable-profile--enable-add-ons--with-headers=/usr/include-- With-binutils=/usr/bin
[[email protected] ~]# make
[[email protected] ~]# make install
If prompted to install successfully, go to the shared library where glibc is located:
[Email protected] ~]# ll/lib64/libc*
You can see that 2.5 of the old library files are also in the 2.10 version of the library file, and the soft link files all point to the 2.10 version.
-rwxr-xr-x 1 root root 8313772 June 4 12:10/lib64/libc-2.10.1.so
-rwxr-xr-x 1 root root 1720712 Jan 01:33/lib64/libc-2.5.so
lrwxrwxrwx 1 root root 15:02/lib64/libcap.so.1-libcap.so.1.10
-rwxr-xr-x 1 root root 17384 Mar 2007/lib64/libcap.so.1.10
-rwxr-xr-x 1 root root 197744 Jan 01:33/lib64/libcidn-2.5.so
lrwxrwxrwx 1 root root 2 14:31/lib64/libcidn.so.1-libcidn-2.5.so
lrwxrwxrwx 1 root root 15:40/lib64/libcom_err.so.2-libcom_err.so.2.1
-rwxr-xr-x 1 root root 10096 Sep 2014/lib64/libcom_err.so.2.1
-rwxr-xr-x 1 root root 109360 June 4 12:10/lib64/libcrypt-2.10.1.so
-rwxr-xr-x 1 root root 45728 Jan 01:33/lib64/libcrypt-2.5.so
-rwxr-xr-x 1 root root 1369312 may 04:58/lib64/libcrypto.so.0.9.8e
lrwxrwxrwx 1 root root 15:40/lib64/libcrypto.so.6-libcrypto.so.0.9.8e
lrwxrwxrwx 1 root root 4 12:10/lib64/libcrypt.so.1-libcrypt-2.10.1.so
lrwxrwxrwx 1 root root 4 12:10/lib64/libc.so.6-libc-2.10.1.so
[Email protected] ~]# strings/lib64/libc.so.6 |grep GLIBC
glibc_2.2.5
glibc_2.2.6
glibc_2.3
glibc_2.3.2
glibc_2.3.3
glibc_2.3.4
glibc_2.4
glibc_2.5
glibc_2.6
glibc_2.7
glibc_2.8
glibc_2.9
glibc_2.10
Glibc_private
Here, the successful update of the GLIBC, it is important to note that the entire installation of the compilation process for a long time, need to wait patiently.
Linux upgrade C Basic runtime CLIBC