Dockerfile
FROM centos:6.6
RUN yum install -y wget tar gcc && yum clean all
RUN mkdir -p /opt/tmp && wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz -O /opt/tmp/glibc-2.15.tar.gz &&\
cd /opt/tmp && tar -xzvf glibc-2.15.tar.gz &&\
cd glibc-2.15 &&\
mkdir build &&\
cd build &&\
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin &&\
make &&\
make install &&\
rm -rf /opt/tmp
glibc查看
-
strings /lib64/libc.so.6 |grep GLIBC_
查看glibc最高支持版本 -
ll /lib64/libc**
可以看到此时的libc.so.6是libc-2.12.so的别名 -
ldd --version
glibc的版本
glibc2.15安装
mkdir -p /opt/tmp
wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz -O /opt/tmp/glibc-2.15.tar.gz
cd /opt/tmp && tar -xzvf glibc-2.15.tar.gz
cd glibc-2.15
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make && make install
rm -rf /opt/tmp
参考
https://cnodejs.org/topic/56dc21f1502596633dc2c3dc
https://segmentfault.com/a/1190000011710031
网友评论