How to Install gcc 4.7.x/4.8.x on CentOS(scl devtools)
来源:互联网 发布:达内软件工资待遇 编辑:程序博客网 时间:2024/04/30 10:18
gcc 4.7.2
Tru Huynh of centos.org has built the redhat developer toolset 1.1, for centos and it contains gcc 4.7.2
So you could simply use his repo and install just gcc, instantly.
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++
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++
gcc 4.8.1
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 devtoolset-2-gcc-c++
usage
To use gcc from devtoolset, use the following command. This command will launch a new shell, wherein all environment variables are automatically set to usedevtools.
$ scl enable devtoolset-1.1 bash
$ gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Alternatively, you can explicitly define the following variables to use devtools.
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++
To set this permanently, you have to add:
export PATH=/opt/centos/devtoolset-1.1/root/usr/bin/:$PATH
in your ~/.profile or ~./profile_bash or equivalent.
Remark:
https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/
Tru Huynh of centos.org has built the redhat developer toolset 1.1, for centos and it contains gcc 4.7.2
So you could simply use his repo and install just gcc, instantly.
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++
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++
gcc 4.8.1
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 devtoolset-2-gcc-c++
usage
To use gcc from devtoolset, use the following command. This command will launch a new shell, wherein all environment variables are automatically set to usedevtools.
$ scl enable devtoolset-1.1 bash
$ gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Alternatively, you can explicitly define the following variables to use devtools.
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++
To set this permanently, you have to add:
export PATH=/opt/centos/devtoolset-1.1/root/usr/bin/:$PATH
in your ~/.profile or ~./profile_bash or equivalent.
Remark:
https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/
0 0
- How to Install gcc 4.7.x/4.8.x on CentOS(scl devtools)
- How to install g++ 4.7.2 & c++11 on CentOS 5.x
- How to Install PyQt4 on OS X
- How to use/install gcc on Mac OS X 10.8 / Xcode 4.4
- How to use/install gcc on Mac OS X 10.8 / Xcode 4.4
- 更新gcc_Install gcc 4.7.x/4.8.x on CentOS
- How to install Redis 3.x on new CentOS 6.6 server
- How to install subclipse on Mac OS X
- how to install cocos2d-x 2.2 on mac
- How to Install Subversion on Mac OS X
- How To Install MongoDB On Mac OS X
- How to install Maven on Mac OS X Mavericks (10.9)
- How to Install PHP intl extension on OS X
- How to Install CyanogenMod 13 on Huawei Honor 5X
- How to Setup OpenERP (Odoo) on CentOS 7.x
- How to Install TeamViewer on CentOS
- How To Install Docker on CentOS 7
- How To Install Openfire On CentOS 7
- 深入学习Vue.js和 chart.js 来制作漂亮的图表
- MP3、AAC、WMA、Ogg、MPC、WAV、FLAC、APE、WV、CD、MIDI、RealVideo等音频格式解析及对比
- jdk1.8迁移到jdk1.7错误解决
- linux下解压命令大全
- Could not find a getter for.. in class.. 异常原因
- How to Install gcc 4.7.x/4.8.x on CentOS(scl devtools)
- MySQL mysql_fetch_array() expects parameter 1 to be resource报错
- GitLab安装
- 简易版扫雷,看见有问题的麻烦评论一下,便于修改。。。。。
- 如何使用idea,idea 如何使用 maven,tomcat
- jquery动态绑定事件
- ZOJ3702-Gibonacci number
- MyBatis一对多只显示一个结果的问题
- ubuntu中建立、复制、移动、删除文件的命令