cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc*
This will install everything under /opt/centos/devtoolset-1.1/root/usr/bin/
to avail it for every particular user specify it in .bashrc file
export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
export gfortran=/opt/centos/devtoolset-1.1/root/usr/bin/gfortran
we can also do this for every users:-
ln -s /opt/rh/devtoolset-2/root/usr/bin/gfortran usr/local/bin/gfortran
now check it :- gfortran
--v
gcc version 4.7.2 20121015 (Red Hat 4.7.2-5) (GCC)
No comments:
Post a Comment