CENTOS 6 通过YUM升级GCC到4.7/4.8
第一阶段:升级到4.7
[root@01314.CN ~]# cd /etc/yum.repos.d
[root@01314.CN yum.repos.d]# wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
[root@01314.CN yum.repos.d]# yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++
安装文件放置位置在:/opt/centos/devtoolset-1.1
具体程序文件位置在:/opt/centos/devtoolset-1.1/root/usr/bin/*
使用最新的gcc环境,所以要替换本地的,使用软连接来完成(也可以设置环境变量,看自己喜好)
[root@01314.CN ~]# mv /usr/bin/gcc /usr/bin/gcc-4.4.7
[root@01314.CN ~]# mv /usr/bin/g++ /usr/bin/g++-4.4.7
[root@01314.CN ~]# mv /usr/bin/c++ /usr/bin/c++-4.4.7
[root@01314.CN ~]# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/gcc /usr/bin/gcc
[root@01314.CN ~]# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/c++ /usr/bin/c++
[root@01314.CN ~]# ln -s /opt/centos/devtoolset-1.1/root/usr/bin/g++ /usr/bin/g++
[root@01314.CN ~]# gcc --version
第二阶段:升级到4.8
[root@01314.CN ~]# cd /etc/yum.repos.d
[root@01314.CN yum.repos.d]# wget http://people.centos.org/tru/devtools-2/devtools-2.repo
[root@01314.CN yum.repos.d]# yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
安装文件放置位置在:/opt/rh/devtoolset-2
具体程序文件位置在:/opt/rh/devtoolset-2/root/usr/bin/*
使用最新的gcc环境,所以要替换本地的,使用软连接来完成(也可以设置环境变量,看自己喜好)
[root@01314.CN ~]# mv /usr/bin/gcc /usr/bin/gcc-4.4.7
[root@01314.CN ~]# mv /usr/bin/g++ /usr/bin/g++-4.4.7
[root@01314.CN ~]# mv /usr/bin/c++ /usr/bin/c++-4.4.7
[root@01314.CN ~]# ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc
[root@01314.CN ~]# ln -s /opt/rh/devtoolset-2/root/usr/bin/c++ /usr/bin/c++
[root@01314.CN ~]# ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++ [root@01314.CN ~]# 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.
CENTOS 6 通过YUM升级GCC到4.7/4.8的更多相关文章
- 通过yum升级gcc/g++至版本4.8.2
最近在坐一个日期处理的问题,需要安装sxtwl模块,但是gcc版本4.7死活也安装不上,最后测试到只能升级gcc版本到4.8才得以解决 [root@123 bin]# gcc -vUsing buil ...
- 为CentOS 6、7升级gcc至4.8、4.9、5.2、6.3、7.3等高版本
CentOS 7虽然已经出了很多年了,但依然会有很多人选择安装CentOS 6,CentOS 6有些依赖包和软件都比较老旧,如今天的主角gcc编译器,CentOS 6的gcc版本为4.4,CentOS ...
- 在CentOS 7.2下升级gcc编译器的版本
默认情况下,CentOS 7.2预装的gcc版本是4.8.x,通过执行命令 gcc -v 可以看到,一般情况下这个版本的编译器已经满足需要了,但是某些特殊的时候为了支持C++更高的特性,需要对gcc编 ...
- CentOS yum升级GCC到4.8
wget http://people.centos.org/tru/devtools-2/devtools-2.repo .repo /etc/yum.repos.d --binutils devto ...
- centOS 6.5 yum升级 gcc4.8 然后又退回来4.4
CentOS 6.5 用了很多年了,一直舍不得省7 . 由于要用到 c++ 11 ,所以决定升级一下. 为了省事我选择用 yum 方式升级,结果最后还是不能用,差点搞坏,这是真机,重装麻烦了. get ...
- Linux-使用 yum 升级 gcc 到 4.8
wget http://people.centos.org/tru/devtools-2/devtools-2.repo mv devtools-2.repo /etc/yum.repos.d yum ...
- CentOS 6通过yum升级Git
By francis_hao Mar 9,2017 在一个新机器上推送代码到github上时出现了下面的问题 error: The requested URL returned error: ...
- CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)
---恢复内容开始--- CentOS 6.6 升级GCC G++ (当前最新GCC/G++版本为v6.1.0) 没有便捷方式, yum update.... yum install 或者 添加y ...
- 转载:Centos升级gcc
一.检查centos 里面是否安装了gcc g++ 输入命令:rpm -qa|grep gcc*有看到就出来gcc的东西就是装了没有的话就yum install gcc* -y 二.升级gcc 对于C ...
随机推荐
- Gradle发布项目到 maven 之novoda/bintray-release(3)
novoda/bintray-release 使用这个插件上传比较简单,只需要两步就可以 1.在项目根目录下的 build.gradle 添加插件依赖 // Top-level build file ...
- Laplace变换要点
Laplace变换在求解微分方程.信号系统.自动控制领域都有重要作用.阅读<复变函数与积分变换>华中科大第三版,小结要点. 方便应用,最先给出变换表: 定义: 性质: 周期函数与卷积:
- PLSQL Developer 客户端工具的安装
安装之前先把客户端工具instantclient_12_1拷贝到一个没有中文和空格的目录中去, 比如我直接放到了D:\tools下面.注意这里需要的是32bit的. 下面开始安装PLSQL Devel ...
- angular2 遇到的问题汇总
angular2 学习资源集锦:https://github.com/timjacobi/angular2-education 在学习angular开发项目过程遇到的问题: 1. 不同componen ...
- 清除canvas画布内容--点擦除+线擦除
清空canvas画布内容 1.重置宽或高 由于canvas每当高度或宽度被重设时,画布内容就会被清空,因此可以用以下方法清空:(此方法仅限需要清除全部内容的情况) var c=document.get ...
- canvas玩转微信红包
CSS3相关属性: <!DOCTYPE html> <html> <head lang='en'> <meta charset='UTF-8'/> &l ...
- Regular Expression 正则表达式
1. "^"表示以什么字符开始,"$"表示以什么字符结束: 2. \w表示字符类,包括大小写字母和数字: 3. “+”表示一个或多个,"*" ...
- Tomcat 数据源的原理、配置、使用
1.数据源的作用及操作原理 在程序代码中使用数据源是可以提升操作性能的,这种性能的提升依靠于运行的原理. 传统JDBC操作步骤 1.加载数据库驱动程序,数据库驱动程序通过CLASSPATH配置: 2. ...
- SQL Server ->> 重新创建Assembly和自动重建相关的数据库编程对象(存储过程,函数和触发器)
在SQL Server中,一旦一个Assembly被其他的数据库编程对象(存储过程,函数和触发器)引用了,这个Assembly就不能被删除.但是问题是,在SQL Server要更新一个Assembly ...
- python 之 BeautifulSoup标签查找与信息提取
一. 查找a标签 (1)查找所有a标签 >>> for x in soup.find_all('a'): print(x) <a class="sister" ...