티스토리 뷰

CentOS6.8 이상없이 완료

wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo

echo enabled=1 >> /etc/yum.repos.d/devtools-2.repo

yum install devtoolset-2-gcc devtoolset-2-binutils -y

yum install devtoolset-2-gcc-gfortran -y

yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran -y

ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/

/opt/rh/devtoolset-2/root/usr/bin/gcc --version

끝나면 gcc 버전 최신으로 변경

curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo

yum install devtoolset-3 -y

이 단계에서오류가 발생하면

vi /etc/yum.repos.d/slc6-scl.repo 에서 첫 번째  gpgcheck=1 을 gpgcheck=0로 수정합니다.

이 후 성공하면 

scl enable devtoolset-3 bash

g++ --version 으로 버전확인하면 최신으로 바뀌어 있는 걸 보실 수 있습니다.



공지사항
최근에 올라온 글
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31