#!/bin/bashnum=`cat /proc/cpuinfo | grep processor | wc -l`yum install wget gcccd /usr/local/src/wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gztar -xf glibc-2.14.tar.gz cd glibc-2.14 && mkdir build../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin/ make $nummake installln -fs /usr/local/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6strings /lib64/libc.so.6 |grep GLIBC
Parameter interpretation
.. /configure--prefix=/usr--disable-profile--enable-add-ons--with-headers=/usr/include--with-binutils=/usr/bin
Note: The ①--disable-profile parameter: compiles the library but does not contain profiling information. This option is ignored if the temporary tool requires profiling information.
②--enable-add-ons parameter: Indicates that GLIBC uses an additional NPTL package as the line libraries.
③--with-headers=/usr/include parameter: tells GLIBC to compile itself with the header file just installed in the USR folder, which provides better optimizations based on the specific characteristics of the kernel.
④--with-binutils=/usr/bin parameter: Specifies the binutils program directory path. This parameter is not required, but they can guarantee that the GLIBC will not be used incorrectly when compiling the Binutils program.
⑤ Some installation methods are compiled when the specified directory is not/usr, but by establishing a soft chain to point to the new libc-2.18.so version, in the process need to delete the original connection, the establishment of a new soft connection, but there is a big pit, that is, when you delete the libc.so.6 will cause system commands are not available.
Shell Installation glibc