Cheat Sheet

Tuesday, February 7, 2017

Install GCC 5.3 on CentOS 7.3 with SCL

Another way to enable GCC 5 just for current bash environment,

sudo yum install centos-release-scl
sudo yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash
which gcc
gcc --version

and then, add this to enablegcc5.sh at /etc/profile.d

#!/bin/bash
source scl_source enable devtoolset-4

There you go

sudo cat > /etc/profile.d/gcc5-scl.sh << EOF
#!/bin/bash 
source scl_source enable devtoolset-4
EOF

No comments:

Post a Comment