미니옵빠의 code stubs

Install g++/gcc 4.8.2 in CentOS 6.6 본문

OS/Linux

Install g++/gcc 4.8.2 in CentOS 6.6

미니옵빠 2017. 8. 16. 12:49

CentOS 6 은 주로 gcc 4.4 사용, CentOS 7 은 4.8 사용

CentOS 6에서 g++/gcc 업그레이드 필요 시 아래 참고


$ 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

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


scl enable devtoolset-2 bash


.bashrc 등에 아래 설정 추가


source /opt/rh/devtoolset-2/enable




node-gyp@3.6.2 / node@6.11.2 / gcc 4.8 in centOS 7에서 build 한 node-gyp 모듈이 gcc 4.4 in centOS 6 에서 build 되지 않아 g++/gcc 버전 업글을 위함


해당 버전에서 C++ v11 문법을 사용해서인 듯




참고:

http://qiita.com/giwa/items/28c754d8fc2936c0f6d2

https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b