How to upgrade gcc on CentOS6.5
来源:互联网 发布:淘宝网玉兰油套装 编辑:程序博客网 时间:2024/06/05 18:36
How to upgrade gcc on CentOS6.5
Question: The default gcc version on CentOS6.5 is too old to build a particular application. How can I upgrade the version of gcc installed on CentOS6.5?
As of CentOS 6.5, the default version of gcc installed is 4.4.7. If you want to upgrade gcc on CentOS, you can install devtools, which is a CentOS version of Red Hat Developer Toolset. The devtools, which is available for CentOS 5 and 6, contains a suite of development tools including gcc, gdb, binutils, elfutils, etc. The devtools 1.1. offers gcc version 4.7.2.
To install devtools on CentOS, use the following commands.
$ sudo wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d$ sudo sh -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo'$ sudo yum install devtoolset-1.1
devtools will be installed under /opt/centos/devtoolset-1.1.
To use gcc from devtoolset, use the following command. This command will launch a new shell, wherein all environment variables are automatically set to use devtools.
$ scl enable devtoolset-1.1 bash$ gcc --version
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/cppexport CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++
参考:
http://ask.xmodulo.com/upgrade-gcc-centos.html
- How to upgrade gcc on CentOS6.5
- CentOS6.8 upgrade gcc to gcc4.8
- []How To Upgrade to PHP 7 on Ubuntu 14.04
- How to Install Python 2.7 on CentOS6.5
- How to Upgrade vQmod
- How to upgrade git?
- How to upgrade nodejs
- how to install phpmyadmin on centos6
- how to install phpmyadmin on centos6
- how to install phpmyadmin on centos6
- CentOS6.5 Upgrade OpenSSH
- how to upgrade CentOS kernel
- How to upgrade sap kernel
- How to upgrade Git to latest version on Mac OS X?
- How to Upgrade Linux Kernel to Stable 3.18.4 on CentOS 7.x
- how-to-install-graphite-on-centos6.6-x86_64
- how-to-install-grafana-on-centos6.6-x86_64
- how-to-install-nginx-on-centos6.6-x86_64
- 飞凌OK335xd-linux-4.9.41 移植
- 我从阿里面试回来,想和Java程序猿谈一谈
- Linux系统上的Nginx安装
- scrapy的xpath语法
- 如何为已有项目配置 Git 源?
- How to upgrade gcc on CentOS6.5
- 微信服务号被动回复消息:该公众号提供的服务出现故障,请稍后再试
- 【Android学习】标题栏
- HashMap 源码解析(1)
- dom4j demo4j 获取所有节点/属性
- 刷新查询购物车的操作---通过访问刷新的接口之后访问查询接口activity-adapter
- SOAP Webserver 与 Restfu
- mapreduce实践篇
- postgres10配置huge_pages