centos安装gcc命令 linux安装gcc命令步骤( 二 )
## 安装第三方SCL源仓库
yum -y install centos-release-scl
## 安装gcc 7.3.1 的版本
yum -y install devtoolset-7-gcc*或yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
## 激活gcc 7.3.1
scl enable devtoolset-7 bash
## 验证
gcc -v

## 需要注意的是使用scl命令激活启用gcc只是临时的,退出当前shell环境或重启系统就会恢复为原来的gcc版本 。若要想一直使用升级后的gcc版本,可配置系统环境变量,使用如下命令:
echo \"source /opt/rh/devtoolset-7/enable\" >> /etc/profilesource /etc/profile
七、升级为5.2.1版本## 安装软件源
wget -O /etc/yum.repos.d/hhorak-devtoolset-4-rebuild-bootstrap-epel-7.repo https://copr.fedorainfracloud.org/coprs/hhorak/devtoolset-4-rebuild-bootstrap/repo/epel-7/hhorak-devtoolset-4-rebuild-bootstrap-epel-7.repo或wget -O /etc/yum.repos.d/hhorak-devtoolset-4-rebuild-bootstrap-epel-7.repo https://copr.fedorainfracloud.org/coprs/hhorak/devtoolset-4-rebuild-bootstrap2/repo/epel-7/hhorak-devtoolset-4-rebuild-bootstrap2-epel-7.repoyum makecache fast
## 安装gcc 5.2.1 的版本yum -y install devtoolset-4-gcc*或yum -y install devtoolset-4-gcc devtoolset-4-gcc-c++ devtoolset-4-binutils
## 激活gcc 5.2.1scl enable devtoolset-4 bash
## 验证gcc -v

## 需要注意的是使用scl命令激活启用gcc只是临时的,退出当前shell环境或重启系统就会恢复为原来的gcc版本 。若要想一直使用升级后的gcc版本,可配置系统环境变量,使用如下命令:
echo \"source /opt/rh/devtoolset-4/enable\" >> /etc/profilesource /etc/profile
八、升级为4.9.2版本注:其实也没必要升级,CentOS7系统默认安装的是4.8.5,同为大版本4,功能作用应相差无几 。
## 安装软件源
wget -O /etc/yum.repos.d/rhscl-devtoolset-3-el7-epel-7.repo https://copr.fedorainfracloud.org/coprs/rhscl/devtoolset-3-el7/repo/epel-7/rhscl-devtoolset-3-el7-epel-7.repoyum makecache fast
## 安装gcc 4.9.2 的版本yum -y install devtoolset-3-gcc*或yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-binutils
## 激活gcc 4.9.2scl enable devtoolset-3 bash
## 验证gcc -v

## 需要注意的是使用scl命令激活启用gcc只是临时的,退出当前shell环境或重启系统就会恢复为原来的gcc版本 。若要想一直使用升级后的gcc版本,可配置系统环境变量,使用如下命令:
echo \"source /opt/rh/devtoolset-3/enable\" >> /etc/profilesource /etc/profile
推荐阅读
- 怎么安装python python下载安装
- cad产品密钥无效 cad2017密钥无效
- hp打印机驱动安装失败怎么办 惠普打印机显示状态错误
- excel打开配置进度, 图标异常 打开excel显示配置进度
- 安防监控怎么安装 安防监控安装流程图片
- 阿里云服务器使用教程centos 阿里云服务器使用教程windows
- mac重装系统u盘制作 如何制作mac系统安装u盘
- vmware安装安卓系统9.0进入图形界面系统 vmware安装安卓系统安装教程
- maceclipse安装教程 javaeclipse安装教程
- 安装心脏支架注意事项