I have CentOS 6, and have installed g++ 4.4.7 with yum install devtoolset-2
However, I want to install g++ 4.8 or higher. How can I do this?
You can download the rpm from here, but note that the package is for CentOS 7. http://mirror.centos.org/centos/7/os/x86_64/Packages/gcc-4.8.3-9.el7.x86_64.rpm
Did you check here https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos?
That what worked for me:
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-binutils
/opt/rh/devtoolset-2/root/usr/bin/gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With