CentOS6 yum升级高版本gcc

gcc 4.8安装

# curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo

# yum install gcc gcc-g++ –y

# gcc  --version

gcc 4.9 安装

# yum install centos-release-scl –y

# yum install devtoolset-3-toolchain –y

# scl enable devtoolset-3 bash

# gcc –version

gcc 5.2 安装

# yum install centos-release-scl –y

# yum install devtoolset-4-toolchain –y

# scl enable devtoolset-4 bash

# gcc --version

# g++  --version

posted @ 2018-08-05 18:59  Hito  阅读(4996)  评论(0编辑  收藏  举报