Centos7安装gcc和g++高版本

操作系统: Centos7.4

这里以gcc9和g++9为例

1.安装gcc安装包的镜像源

yum install centos-release-scl

2.安装gcc9和g++9

yum install devtoolset-9

安装后在目录 /opt/rh/devtoolset-9/root/bin/

这里有gcc9和g++9以及gdb8.3版本

3.安装其他高版本gcc

只需要把步骤2的devtoolset-9改成devtoolset-7就是安装gcc7和g++7,也就是说数字几就是代表版本,并且相互之间不会有影响。

 

 

 

 

猜你喜欢

转载自blog.csdn.net/wh_computers/article/details/113775784