与
ESC
输入关键词搜索文章

centos6.8 gcc升级至4.8

全文约 159 字预计阅读 1 分钟
为了安装swoole扩展,在cenots6.8下默认gcc版本不到最低gcc4.8要求,如果centos7就够了。 1、检查本机centos版本: $ cat /etc/centos-release CentOS release 6.5 (Final) 2 、导入CERN’s GPG key rpm --import http://linuxsoft.cern.ch/cern/slc68/x86_64/RPM-GPG-KEY-cern 3、添加slc6-devtoolset yum源 wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo 4、安装devtoolset-2 yum install devtoolset-2 5、 生效devtoolset-2 source /opt/rh/devtoolset-2/enable 可以将此命令写入.bashrc中,以免每次手动执行 echo 'source /opt/rh/devtoolset-2/enable' >> ~/.bashrc 6、查看gcc版本: $ gcc -v gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)

发表评论

评论 0 条

暂无评论,来说点什么吧。