- sudo rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
- wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
- yum install -y devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2
- ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
- hash -r
- gcc --version
Or:
wget -O - https://gist.githubusercontent.com/freekrai/b300a34c0dc532d22db9/raw/6c01edf76a20ab7fb1831ea1101f4a9d9cba4cc4/gcc.sh | bash
yum -y remove devtoolset-2-*
yum install -y devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2 devtoolset-2-binutils devtoolset-2-libstdc++-devel-4.8.2
cd /usr/local/bin
find -type l -delete
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
rm -rf /usr/local/bin/sudo
hash -r