centos 7上安装 gcc 4.7.2

CentOS7的默认gcc是4.8.5,需要降级到gcc 4.7.2

sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
sudo yum localinstall --nogpgcheck compat-libgmp-4.3.1-1.sl7.x86_64.rpm compat-libmpfr-2.4.1-1.sl7.x86_64.rpm

sudo yum install devtoolset-1.1-gcc-c++ --nogpgcheck http://linuxsoft.cern.ch/cern/devtoolset/slc6X/x86_64/RPMS/

scl enable devtoolset-1.1 bash

AttachmentSize
compat-libmpfr-2.4.1-1.sl7_.x86_64.rpm153.52 KB
compat-libgmp-4.3.1-1.sl7_.x86_64.rpm168.78 KB