centos6 升级最新的开发工具包

历史原因用的centos6的机器太多了,但是开发工具包又太旧,升级开发工具包到c++11 还是很简单的。

安装升级工具包源:

wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo

升级源

yum upgrade

下一步安装 C++11

yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

最后在当前shell启用最新开发工具包

scl enable devtoolset-2 bash

检查gcc版本

# gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

猜你喜欢

转载自blog.csdn.net/robinhunan/article/details/79407986