curl -O http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
tar zxf glibc-2.28.tar.gz
cd glibc-2.28/
mkdir build
cd build/
../configure --prefix=/usr #注意了,别修改路径
make -j2
make install
如果../configure 时报错:These critical programs are missing or too old: bison make compiler
如果bison --version 没找到,安装bison:
yum install bison
安装新版make:
wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar xvf make-4.3.tar.gz
cd make-4.3/
./configure
make
sudo make install
yum remove make
ln -s /usr/local/bin/make /usr/bin/
make --version
安装新版gcc:
yum install centos-release-scl
yum install devtoolset-7-gcc*
#开机启动
scl enable devtoolset-7 bash
#查看版本
which gcc
gcc --version
End 如果