个人学习笔记,谢绝转载!!!
原文:https://www.cnblogs.com/wshenjin/p/14524125.html
查看现有版本
# ll /lib64/libc.so.6
lrwxrwxrwx. 1 root root 12 Jul 8 2019 /lib64/libc.so.6 -> libc-2.12.so
# ll /lib64/libc-2.12.so
-rwxr-xr-x 1 root root 1928936 May 10 2016 /lib64/libc-2.12.so
安装
# wget https://mirrors.tuna.tsinghua.edu.cn/gnu/glibc/glibc-2.18.tar.gz
# tar xf glibc-2.18.tar.gz
# mkdir glibc-2.18/build/
# cd glibc-2.18/build/
# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include
# make && make install
# 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_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_PRIVATE
# ldd --version
ldd (GNU libc) 2.18
#异常回退
#cd /lib64
#LD_PRELOAD=/lib64/libc-2.12.so ln -svf /lib64/libc-2.12.so libc.so.6