centos鍗囩骇gcc4.4.7鍒4.8.2

1.浣跨敤 redhat developer toolset 1.1 鐨剅epo锛屽畨瑁匞CC

cd /etc/yum.repos.d

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

yum --enablerepo=testing-devtools-2-centos-6 install devtoolset-2-gcc devtoolset-2-gcc-c++

2. 鏇挎崲绯荤粺涓師鏉ョ殑GCC

閫氳繃閫氳繃绗竴姝ヤ細鎶 GCC 瀹夎鍒颁互涓嬬洰褰曪細

/opt/rh/devtoolset-2/root/usr/bin
鎺ヤ笅鏉ラ渶瑕佷慨鏀圭郴缁熺殑閰嶇疆锛屼娇榛樿鐨 gcc 鍜 g++ 鍛戒护浣跨敤鐨勬槸鏂板畨瑁呯殑鐗堟湰銆

ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
鐜板湪鏌ョ湅 g++ 鐨勭増鏈彿锛

#gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

All posts

Other pages

鍙戣〃璇勮

鐢靛瓙閭欢鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢*鏍囨敞