sudo yum install centos-release-scl
sudo yum install devtoolset-7
scl enable devtoolset-7 bash
root用户下
1.yum install centos-release-scl -y
2.yum install devtoolset-7 -y
以下命令添加到bashrc
source /opt/rh/devtoolset-7/enable
怎么添加?
1.vi ~/.bashrc
末尾加上source /opt/rh/devtoolset-7/enable
2.source ~/.bashrc
3.g++ -v查看版本
网友评论