1. 下载glibc 2.31
wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.31.tar.gz
2.解压
tar -xf glibc-2.31.tar.gz
cd glibc-2.31
mkdir build && cd build
3.修改
Makefile 125行添加一行
yum reinstall libxcrypt -y
scripts/test-installation.pl 128行修改为:
&& $name ne "nss_test1" && $name ne "nss_test2" && $name ne "nss_nis" && $name ne "nss_nisplus" && $name ne "libgcc_s" && $name ne "nsl" ) {
3.编译
安装依赖
yum install -y gcc gcc-c++ m4 python3 bison fontconfig-devel libXpm-devel texinfo
export LD_LIBRARY_PATH=
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --disable-werror
make -j8
make install
打完收工: