//by yan 20200523

centos 升级gcc: centos7默认 gcc版本是4.8.5,编译不了redis6,需要升级

[root@VM_16_17_centos redis-6.0.3]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: …/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

//安装源:
[root@VM_16_17_centos redis-6.0.3]##yum install centos-release-scl scl-utils-build
//查看版本
[root@VM_16_17_centos redis-6.0.3]# yum list all --enablerepo=‘centos-sclo-rh’| grep gcc
//安装
[root@VM_16_17_centos redis-6.0.3]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
[root@VM_16_17_centos redis-6.0.3]# scl enable devtoolset-9 bash
//安装完,再查版本
[root@VM_16_17_centos redis-6.0.3]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: …/configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.1.1-20190605/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.1.1 20190605 (Red Hat 9.1.1-2) (GCC)

参考:https://blog.csdn.net/goodsirlee/article/details/106078654

centos 升级gcc相关推荐

  1. 利用 scl 为 CentOS 升级 gcc 版本

    利用 scl 为 CentOS 升级 gcc 版本 (一)背景 在搞 dpvs 期间遇到的一个问题,在编译 dpdk 程序时会根据所在服务器的 cpu 所拥有的指令集,为了尽可能提高程序效率,将较新的 ...

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

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

  3. centos升级gcc

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

  4. CentOS升级gcc到4.8.2以支持C++11标准的方法

    原来的GCC版本:4.4.7(在用户目录下即可查看,输入命令 gcc -v或g++ -v) 升级步骤: 首先下载4.8.2安装包,输入命令: wget http://gcc.skazkaforyou. ...

  5. centos7升级gcc到5.3.0

    centos升级gcc到4.8.1(支持c++11)步骤 下载gcc最新版 wget http://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.gz 然后解 ...

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

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

  7. 【转】CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)

    原文地址:https://www.cnblogs.com/lzpong/p/5755678.html 我这里是centos7 升级到gcc8.1,过程差不多,参考这篇文章,记录一下. ---原文--- ...

  8. linux6.7能升级6.8吗,CentOS 六、7升级gcc至4.八、4.九、5.二、6.三、7.3等高版本

    CentOS 7虽然已经出了不少年了,但依然会有不少人选择安装CentOS 6,CentOS 6有些依赖包和软件都比较老旧,现在天的主角gcc编译器,CentOS 6的gcc版本为4.4,CentOS ...

  9. 为CentOS 6、7升级gcc至4.8、4.9、5.2、6.3、7.3等高版本

    欢迎访问个人网站 首页_码到城攻码到城攻分享但不限于IT技术经验技巧.软硬资源.所闻所见所领会等,站点提供移动阅读.文章搜索.在线留言.支付打赏.个人中心.免签支付等功能https://www.cod ...

最新文章

  1. 怪不的软件开发这么挣钱,原来是有这么多职位
  2. HDU4970 Killing Monsters dp
  3. Spring的使用步骤
  4. 计算机职称 计算机二级证,国家计算机二级证书含金量有多高
  5. 用python开启相机_如何用Python打开realsenseD435相机并获取相机参数
  6. python 隐含波动率_【BSM模型】用实际市场数据计算隐含波动率并验证波动率微笑...
  7. 根据控件ID得到句柄
  8. LeetCode:Add Binary
  9. 微信UnionID作用
  10. HTML基础编程——简介及第一行代码
  11. 用python贴吧自动回帖_python基于selenium实现贴吧自动发帖
  12. oracle dbms_utility,dbms_utility的两个有用方法
  13. shapely包导入问题
  14. 嵌入式linux开发,flex库移植
  15. MacBookPro 18款 连接上WiFi却无法上网
  16. ABI and ISA
  17. 查询亿级数据毫秒级返回!Elasticsearch 是如何做到的?
  18. Vmware虚拟机下三种网络模式配置
  19. 2023届暑期实习京东物流一面
  20. pytorch repeat使用

热门文章

  1. 分享25个CSS前端网页设计常用技巧
  2. VC/MFC列表CListCtrl类的LVCOLUMN和LVITEM详解
  3. 2014年2月份第3周51Aspx源码发布详情
  4. MFC和c#中模拟对另一进程的窗口按钮点击
  5. swift5的SnipKit框架使用
  6. python r语言培训_r语言和python学哪个
  7. css实现loading,CSS3 19种LOADING(加载)动效
  8. Android开发之添加QQ群的方法(官方代码)
  9. android expandablelist 自动滚动,在ExpandableListView中,如何保留滚动位置_android_开发99编程知识库...
  10. python异常处理优点_python自测100题(下)