这里使用第三方直接编译好的,devtoolset

5系列需要更新/etc/yum.repos.d/CentOS-Base.repo ,使用清华大学的镜像源,或者其他镜像源

[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/5.11/os/$basearch/
enabled=1
gpgcheck=0[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/5.11/updates/$basearch/
enabled=1
gpgcheck=0[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/5.11/extras/$basearch/
enabled=1
gpgcheck=0[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/5.11/centosplus/$basearch/
enabled=1
gpgcheck=0

然后执行

wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
yum clean all
yum install devtoolset-2
scl enable devtoolset-2 bash
gcc --version

如果需要使用代理(v2RayN)

export http_proxy=http://20.0.0.1:10809

以下是原文参考

Developer Toolset


Please note: Developer Toolset v. 2.0/2.1 has been superceeded by Developer Toolset 3.1 on SLC6/CC7

This documentation page applies only to SLC5 as of Dec 2015.


  • Developer Toolset 3.0
  • Developer Toolset 2.1
  • Developer Toolset 2.0
  • Developer Toolset 1.1
  • Installation

Developer Toolset is an offering for developers on the Scientific Linux CERN 5 and 6 platforms. Using a framework called Software Collections, an additional set of tools is installed into the /opt directory, as recommended by the UNIX Filesystem Hierarchy Standard. These tools are enabled by the user on demand using the supplied scl utility.

Develper Toolset packages are provided here for TEST PURPOSE ONLY.

(More information about Developer Toolset on Red Hat site)

Please note that ONLY support we provide for Developer Toolset packages is related to installation / packaging problems. This product is provided AS-IS - without support.

For everything else, please read the documentation.


Developer Toolset 3.0

Developer Toolset 3.0 is distributed as part of Software Collections, please read the documentation for Software Collections.


Developer Toolset 2.0 updated to 2.1

Developer Toolset 2.1 provides new tools:

  • git - GIT - version 1.8.4

Developer Toolset 2.1 provides also updated tools:

  • gcc/g++/gfortran - GNU Compiler Collection - version 4.8.2
  • eclipse - An Integrated Development Environment - version 4.3.1 (Kepler)

Note: Please note 2.1 is an upgrade of 2.0 and can't be installed in parrallel.

Documentation

Developer Toolset 2.1 documentation (Local Copy)

  • 2.1 Release Notes
  • Software Collections Guide
  • User Guide

Full Developer Toolset documentation can be found on RedHat site.


Developer Toolset 2.0

Developer Toolset 2.0 provides following tools:

  • gcc/g++/gfortran - GNU Compiler Collection - version 4.8.1
  • gdb - GNU Debugger - version 7.6.34
  • binutils - A GNU collection of binary utilities - version 2.23.52
  • elfutils - A collection of utilities and DSOs to handle compiled objects - version 0.155
  • dwz - DWARF optimization and duplicate removal tool - version 0.11
  • systemtap - Programmable system-wide instrumentation system - version 2.1
  • valgrind - Tool for finding memory management bugs in programs - version 3.8.1
  • oprofile - System wide profiler - version 0.9.8
  • eclipse - An Integrated Development Environment - version 4.3 (Kepler)

Note: Eclipse IDE is available ONLY on SLC6.

Documentation

Developer Toolset 2.0 documentation (Local Copy)

  • 2.0 Release Notes
  • Software Collections Guide
  • User Guide

Full Developer Toolset documentation can be found on RedHat site.


Developer Toolset 1.1

Developer Toolset 1.1 provides following tools:

  • gcc/g++/gfortran - GNU Compiler Collection - version 4.7.2
  • gdb - GNU Debugger - version 7.5
  • binutils - A GNU collection of binary utilities - version 2.23.51
  • elfutils - A collection of utilities and DSOs to handle compiled objects - version 0.154
  • dwz - DWARF optimization and duplicate removal tool - version 0.7
  • systemtap - Programmable system-wide instrumentation system - version 1.8
  • valgrind - Tool for finding memory management bugs in programs - version 3.8.1
  • oprofile - System wide profiler - version 0.9.7

Documentation

Developer Toolset 1.1 documentation (Local Copy)

  • 1.1 Release Notes
  • Software Collections Guide
  • User Guide

Full Developer Toolset documentation can be found on RedHat site.


Installation

  • Scientific Linux 6 (SLC6)
    Save repository information as /etc/yum.repos.d/slc6-devtoolset.repo on your system:

    wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
    
  • Scientific Linux 5 (SLC5)
    Save repository information as /etc/yum.repos.d/slc5-devtoolset.repo on your system:

    wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
    

To install the developer toolset 2.0 run:

yum install devtoolset-2

To test installed environment:

$ scl enable devtoolset-2 bash
$ gcc --version
gcc (GCC) 4.8.1 20130715 (Red Hat 4.8.1-4)
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.

To install the developer toolset 1.1 run:

yum install devtoolset-1.1

To test installed environment:

$ scl enable devtoolset-1.1 bash
$ gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 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.

RHEL5 RHEL6升级GCC相关推荐

  1. RHEL5.4 x86_64 GCC 4.1.2 升级到4.7.0版过程(含安装MPFR、GMP、MPC过程)

    RHEL5.4 x86_64 GCC 4.1.2 升级到4.7.0版过程 (含安装MPFR.GMP.MPC过程) redhat 库先安装到某个路径不替换原有库还是提示checking for the ...

  2. Ubuntu14.04 LTS中升级gcc/g++版本到4.9.4的操作步骤

    Ubuntu14.04 LTS中默认的gcc/g++版本为4.8.4,如下图,在C++11中增加了对正则表达式的支持,但是好像到gcc/g++ 4.9.2版本才会对正则表达式能很好的支持,这里介绍下U ...

  3. Centos6.5升级gcc for qt5.3.1

    1.升级GCC CentOS6.5内置的GCC版本为4.4,而Qt5.2.1则需要4.8.2的支持(支持C++ 11特性),因此,必须先升级GCC wget http://ftp.tsukuba.wi ...

  4. Mac中使用port升级gcc版本

    Mac中使用port升级gcc版本 Mac OS中的gcc版本可能不会满足实际使用要求,需要对其升级. 这里介绍使用port方式来升级gcc版本.Macports是Mac OS中的软件包管理工具. 首 ...

  5. Linux(CentOS)升级gcc到4.8.5版本

    本人使用的是CentOS 6.2 64位系统,由于在安装系统的时候并没有勾选安装gcc编译器,因此需要自行安装gcc编译器. 系统信息查看命令: cat /etc/redhat-release 使用y ...

  6. linux下安装或升级GCC 4.8以上版本(包括),以支持C++11

    本文转载自:http://www.cnblogs.com/lizhenghn/p/3550996.html C++11标准在2011年8月份获得一致通过,这是自1998年后C++语言第一次大修订,对C ...

  7. CentOS 7升级gcc 8.3.1 7.x.x 4.9.4版本

    Centos 7默认gcc版本为4.8,有时需要更高版本的,这里以升级至8.3.1版本为例(升级gcc7系列也是类似的步骤),分别执行下面三条命令即可,无需手动下载源码编译 1.安装centos-re ...

  8. 关于如何升级gcc版本及相关的标准库问题

    关于如何升级gcc版本及相关的标准库问题 文章目录 关于如何升级gcc版本及相关的标准库问题 第一大步:先升级gcc 第二大步:更新标准库(libstdc++.so.6) 第一大步:先升级gcc (这 ...

  9. centos升级gcc

    今天写了一些c++测试代码,用到了CAS操作,属于c++11的东西,发现旧版本的gcc居然不支持,笔者原来是gcc4.8.5,而gcc到了4.9才能完全支持c++11 没办法,只好升级gcc了,这里把 ...

最新文章

  1. [转]ActionScript 3.0入门:Hello World、文件读写、数据存储(SharedObject)、与JS互调
  2. 太骚了!Python模型完美切换SAS,还能这么玩。。
  3. [置顶]       编写自己的JQUERY插件
  4. XX System Test Plan
  5. java中float%int_java中short、int、long、float、double取值范围
  6. 谷歌 Provisional headers are shown 和360急速模式 网络连接错误
  7. SQL_Server_2008完全学习之第六章数据查询和管理
  8. JavaScript数据类型之Boolean以及undefined和null(4)
  9. mysql中时间处理函数_基于mysql时间处理函数的应用详解
  10. 车辆路径问题与相关算法总结
  11. 成都拓嘉启远:拼多多如何查看同行转化数据
  12. 2018年 数据挖掘“泰迪杯” C题 第二问
  13. 网络营销行业十大看了就想吐的“滥词”
  14. 技能梳理8@esp8266+lua+onenet+血氧检测MAX30102
  15. coreldraw16开三折页_cdr印刷设计排版教程,教你三折页设计制作方法
  16. ubuntu下lnmp安装mysql密码_Ubuntu LNMP环境搭建
  17. hazelcast java_Hazelcast
  18. 大学英语综合教程三 Unit 5 课文内容英译中 中英翻译
  19. 如何调整屏显时间_电脑怎么设置自动关闭显示器的时间?
  20. MFC注册表CRegKey

热门文章

  1. vue导入excel进度条_Vue 前端开发——导入Excel/Csv
  2. mysql plugin filed_MySQL启动时报Plugin 'InnoDB' registration as a STORAGE ENGINE failed.错误
  3. 中的listeners_Netty源码学习(6)-- Netty中的异步处理
  4. 服务器搬迁方案_数据中心机房改造搬迁IDC机房工程建设
  5. druiddatasource配置_Springboot属性注入 Java配置和Value配置
  6. c语言测验答案,C语言测验题答案.doc
  7. html5边框顶格,CSS 三种定位方式以及格式化上下文详解 》 html5jscss
  8. java集合租车_Java入门第二季 租车系统
  9. cos html cache插件,关于Cos-Html-Cache插件不能创建首页缓存的解决办法
  10. 汇编小程序---计算十以内两个数的相加