gcc版本升级

https://blog.csdn.net/terminatorsong/article/details/74089911

 

如果使用的CentOS6.10,需要看一下gcc –version,如果版本比较低,如4.4这样的版本,是不支持C++11标准,会在bitcoin的make步骤报一些语法错误。

处理办法:

sudo wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
sudo yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
  •  

这样就安装了gcc version4.8的版本。但是并不是默认开启的,需要执行

scl enable devtoolset-2 bash
  •  

然后在当前会话中就会开启使用gcc4.8的编译环境。

也可以在.bashrc里加入

echo "WARNING: devtoolset-2 is enabled!"
. /opt/rh/devtoolset-2/enable
  •  

来每次都开启此编译环境。

你可能感兴趣的:(c++)