yum install centos-release-scl –y
yum install devtoolset-7-toolchain –y
scl enable devtoolset-7 bash
gcc --version
g++ --version
7是本版号 换成你要升级到的版本
yum install centos-release-scl –y
yum install devtoolset-7-toolchain –y
scl enable devtoolset-7 bash
gcc --version
g++ --version
7是本版号 换成你要升级到的版本