I am using Centos 7 with kernel 3.10.0
My current gcc version is 4.8.5 and I am trying to install gcc 7 or later versions. I have followed instructions from How to install GCC/G++ 8 on CentOS
When I try scl enable devtoolset-8 -- bash
, it shows
Unable to open /etc/scl/conf/devtoolset-8!
Then I have checked in /etc/scl/conf/ where there is one file named ‘devtoolset-9’. But I was expecting devtoolset-8.
If I run yum list installed | grep devtoolset
, it shows packages related to devtoolset-8 and devtoolset-7. But I can not switch to gcc 7 or 8 because of that previous error. If I run scl enable devtoolset-9 -- bash
, it does not change to the gcc version, stays at the default gcc. What may go wrong and how do I switch to gcc 7 or 8 in my case?
2
Answers
I ran into the same issue that you are facing and this is how I got it fixed:
Good luck
just only runing ‘yum install devtoolset-8-gcc devtoolset-8-gcc-c++’ is not working for me too.
i tried to run ‘yum install devtoolset-8 -y, and it is working fine.
cheers