centos6 yum 安装 install c++4.8 gcc4.8
2015-09-15 13:13
851 查看
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 devtoolset-1.1-gcc-c++
[/code]
This will install it most likely into
/opt/centos/devtoolset-1.1/root/usr/bin/
Then you can tell your compile process to use the gcc 4.7 instead of 4.4 with the CC variable
export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++
For g++ 4.8.2, change
1.1to
2everywhere, and change
--enablerepo=testing-1.1-devtools-6to
--enablerepo=testing-devtools-2-centos-6
[/code]
There is new version of devtoolset 2.0. Nice people from Cern working on Scientific Linux createdan open version:
If you use CentOS (not Scientific Linux), then you will have to import their GPG key from here using:
rpm --import http://www.scientificlinux.org/documentation/gpg/RPM-GPG-KEY-cern
Enjoy!
EL6 gcc-4.8 http://www.hop5.in/yum/el6/repoview/gcc.html
or this
http://puias.princeton.edu/data/puias/DevToolset/6/x86_64/ /etc/yum.repos.d/DevToolset.repo
[DevToolset-2] name=RedHat DevToolset v2 $releasever - $basearch baseurl=http://people.centos.org/tru/devtools-2/$basearch/ enabled=1 gpgcheck=0
Testing run
# yum install devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2 # /opt/rh/devtoolset-2/root/usr/bin/gcc --version
export 做好软链接
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/ hash -r gcc --version
相关文章推荐
- crontab(linux下定时执行任务命令)
- centos perf kvm使用
- Linux输入法问题
- Linux CentOS6系统安装最新版本Node.js环境及相关文件配置
- 【转】CentOS下firefox安装flash说明
- Linux软件包管理
- CentOS采用grub进 single状态
- 在各种Linux发行版上安装Git的教程
- 靠谱linux常用基础命令
- CentOS下ifconfig eth0:unknown interface:no such device
- linux 命令 去掉重复行
- I/O缓冲
- linux学习三 - 安装
- 在CentOS下安装JDK8
- 在CentOS下安装JDK8
- enumerate函数
- linux地址映射1、2、3(☆☆☆)
- linux下weblogic 12c 之集群技术
- CentOS 7编译RTL8192CU网卡驱动出现错误的原因及解决办法
- Linux useradd添加用户后sudo -s导致命令行提示符显示不正常