centos7升级glibc
作者:吴业亮
博客:wuyeliang.blog.csdn.net
安装bison:
yum install bison -y
安装wget、bzip2、gcc、gcc-c++和glibc-headers:
yum -y install wget bzip2 gcc gcc-c++ glibc-headers
安装make-4.2.1:
wget http://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz
tar -zxvf make-4.2.1.tar.gz
cd make-4.2.1
mkdir build
cd build
../configure --prefix=/usr/local/make && make -j 32 && make install
配置环境变量:
export PATH=/usr/local/make/bin:$PATH
ln -s /usr/local/make/bin/make /usr/local/make/bin/gmake
检查make版本:
make -v
安装centos-release-scl:
yum install centos-release-scl -y
安装devtoolset-8:
yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils
配置环境变量:
echo "source /opt/rh/devtoolset-8/enable" >> /etc/profile
source /etc/profile
下载并解压glibc-2.28:
wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz --no-check-certificate
xz -d glibc-2.28.tar.xz
tar -xvf glibc-2.28.tar
cd glibc-2.28
mkdir build
cd build
配置glibc-2.28:
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
编译glibc-2.28:
make -j32
安装glibc-2.28:
make install
希望以上信息能对你有所帮助。