天天看点

centos7 升级gcc9.1.0版本

centos7 环境 查缺补漏

yum install gcc gcc-c++ -y
yum install bzip2 -y       

gcc版本下载:https://gcc.gnu.org/mirrors.html 选择最近的镜像 通常是Japan

download : http://mirror.koddos.net/gcc/releases/gcc-9.1.0/gcc-9.1.0.tar.xz

解压

tar -Jxf gcc-9.1.0.tar.xz      

安装依赖环境

cd gcc-9.1.0/
./contrib/download_prerequisites      

编译gcc 耗时较长

make -j4      
make install      

安装之后执行 gcc -v 查看版本

转载于:https://www.cnblogs.com/alittlesmile/p/10909493.html