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 ...
随机推荐
- Oracle RAC集群添加节点
一,节点环境 所有节点分发/etc/hosts,这里我添加两个节点,一个是上次删除的节点,另一个是什么都没有的节点,尝试添加 服务器介绍什么的都在这hosts文件了,大家自己琢磨下 [grid@nod ...
- java语言编程使用正则表达式来实现提取(美团 3-5年经验 15-30k 北京 hadoop高级工程)中的3-5和15-30
不多说,直接上干货! 如有这样的一条数据进来: 美团 3-5年经验 15-30k 北京 hadoop高级工程 //正则表达式提取工资值,因为15-30k后面有k,3-5年经验,不干净 public ...
- 获取全球dns统计信息
# -*- coding:UTF-8 -*- import requests, time import json from bs4 import BeautifulSoup as bp t3 = ti ...
- 《Python编程从入门到实践》_第七章_用户输入和whlie循环
函数input()的工作原理 函数input()让程序暂停运行,等待用户输入一些文本.获取用户输入后,python将其存储在一个变量中,以方便你使用. #输入用户名 username = input( ...
- What's the difference between @Component, @Repository & @Service annotations in Spring?
@Component is equivalent to <bean> @Service, @Controller , @Repository = {@Component + some mo ...
- 虚拟环境--pipenv
1.安装pipenv,这个工具属于python3 升级pip : pip3 install pipenv 2.在项目中创建虚拟环境 3.激活虚拟环境,进入虚拟环境 进入虚拟环境之前: pipenv s ...
- JS数组遍历方法
常用数组遍历方法: 1.原始for循环 var a = [1,2,3]; for(var i=0;i<a.length;i++){ console.log(a[i]); //结果依次为1,2,3 ...
- 2018.10.23NOIP模拟赛解题报告
心路历程 预计得分:\(100 + 50 + (10 \sim 50)\) 实际得分:\(100 + 10 + 50\) 这可能是我打的最懵逼的一场考试没有之一.. T1两个小时才做出来也是醉了. T ...
- 使用jquery去掉时光轴头尾部的线条
一.前言:以前做类似时光轴的结构,几乎都是一条灰色线飞流直下,没有尽头.今天这个线条是从第一个圆点到最后一个圆点,那么问题来了,内容的高度还不是固定的,线条的长度怎么确定?怎么就能刚刚好从第一个点到最 ...
- HTML字符实体名称/实体编号
字符实体对英文的大小写敏感! 字符实体一: 显示结果 描述 实体名称 实体编号 空格 < 小于号 < < > 大于号 > > & 和号 & ...