[CentOS Step 1] yum install centos-release-scl -y
[CentOS Step 2] yum install devtoolset-7 -y
[CentOS Step 3] scl enable devtoolset-7 bash
注意:
scl命令启用是临时的,退出shell或重启就会恢复原系统gcc版本。
版本7 执行:echo "source /opt/rh/devtoolset-7/enable" >>/etc/profile
版本9 执行:echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
CentOS 通过 devtoolset 安装高版本 工具
于 2022-03-09 11:50:54 首次发布