最新版本的glibc是2.34,但是编译失败了,这里已2.33为教程
安装高于4.8的gcc yum -y install centos-release-scl yum -y install devtoolset-11 bison ca-certificates 开启gcc11 scl enable devtoolset-11 bash 编译make cd /usr/local/src/ wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz tar zxvf make-4.3.tar.gz && cd make-4.3 ./configure && make -j && make install ln -s -f /usr/local/bin/make /usr/bin/make make -v 编译python3 cd /usr/local/src/ wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tar.xz tar xvf Python-3.10.2.tar.xz && cd Python-3.10.2 ./configure && make -j && make install python3 -V 编译glibc2.33 cd /usr/local/src/ wget https://ftp.gnu.org/gnu/libc/glibc-2.33.tar.xz && tar -Jxvf glibc-2.33.tar.xz && mkdir glibc-2.33/build && cd glibc-2.33/build LD_LIBRARY_PATH='' ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-redhat-linux --enable-kernel=3.10.0 --without-gd --disable-profile 或者 ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-redhat-linux --enable-kernel=3.10.0 --without-gd --disable-profile --with-selinux make -j && sed -i '128i\ && $name ne "nss_test2"' ../scripts/test-installation.pl && make install make -j localedata/install-locales && service crond restart 查看glibc版本 ls -l /lib64/libc.so.6