centOS 6.5 yum升级 gcc4.8 然后又退回来4.4
CentOS 6.5 用了很多年了,一直舍不得省7 。
由于要用到 c++ 11 ,所以决定升级一下。
为了省事我选择用 yum 方式升级,结果最后还是不能用,差点搞坏,这是真机,重装麻烦了。
get http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2
查看 gcc 版本
/opt/rh/devtoolset-2/root/usr/bin/gcc --version
yum install devtoolset-2-gcc-gfortran
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
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.
看样子,挺好哈,一切正常。
结果使用的时候
/opt/rh/devtoolset-2/root/usr/libexec/gcc/i686-redhat-linux/4.8.2/ld: lxdialog/checklist.o: undefined reference to symbol 'acs_map'
/opt/rh/devtoolset-2/root/usr/libexec/gcc/i686-redhat-linux/4.8.2/ld: note: 'acs_map' is defined in DSO /lib/libtinfo.so.5 so try adding it to the linker command line
/lib/libtinfo.so.5: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
ln -s /usr/lib/libtinfo.so.5 make
看来还要手工编译安装比较靠谱
就要先把这个给删除掉。
yum remove devtoolset*
然后,手动删除 /usr/local/bin/ 下面的软链
然后我想,把 gcc remove 在 install 应该就回来了,结果老是提示 gcc 找不到。
最后我看上面有一句 hash -r
就重新执行了一下, gcc 4.4 终于回来了。
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
Copyright © 2010 Free Software Foundation, Inc.
源码编译比较简单吧,就是慢点。
centOS 6.5 yum升级 gcc4.8 然后又退回来4.4的更多相关文章
- 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.c ...
- CentOS 6通过yum升级Git
By francis_hao Mar 9,2017 在一个新机器上推送代码到github上时出现了下面的问题 error: The requested URL returned error: ...
- centos yum升级php
centos yum升级php5.3.3到最5.6.3 不要轻易升级,否则后果很严重! 注意事项: 1 升级后之前的php扩展不会丢失 自动会安装对应最新php的扩展2 升级后需重启下apache 才 ...
- CentOS 6.6 yum源完全配置
原文地址 http://blog.csdn.net/halazi100/article/details/41311837 一 yum 简介 yum,是"Yellow dog Updater, ...
- CentOS 6.x 如何升级 glibc 2.17
CentOS 6.x 如何升级 glibc 2.17 ldd --version rpm -qa | grep glibc #查看glibc的版本 strings /lib64/libc.so.6 | ...
- Linux Centos 7.4 内核升级
Linux Centos 7.4 内核升级 原始内核版本:3.10.0-693.2.2.el7.x86_64 升级内核版本:4.14.9-1.el7.elrepo.x86_64 1.导入key Key ...
- 安装CentOS版本的yum(转载)
安装CentOS版本的yum 下载源:http://mirrors.163.com/centos/6/os/i386/Packages/ 材料准备: python-iniparse-0.3.1-2.1 ...
- Centos 7.x 内核升级
作者信息 邮箱:sijiayong000@163.com Q Q:601566386 Centos 7.x 内核升级 注意:这篇文章只在 CentOS 7.× 系列版本上验证过,其他 CentOS 版 ...
- CentOS / RHEL 配置yum源
CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...
随机推荐
- 奇点云 x 阿里云 | 联合发布综合体数字化转型与数据创新解决方案
2019年7月25日下午,在阿里云峰会上海站,奇点云入选阿里云首批联合解决方案合作伙伴,并联合发布了“综合体数字化转型与数据创新解决方案”,共同探索综合体的智能服务. 关于综合体的数字化转型,奇点云联 ...
- [LC] 46. Permutations
Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] O ...
- EntityNotFoundException EntityExistException
package me.zhengjie.common.exception; import org.springframework.util.StringUtils; import java.util. ...
- 吴裕雄--天生自然python学习笔记:Matplotlib 基本绘图
使用 Matplotlib 组件绘图时,经常要与 Numpy 组件搭配使用 . 使用 Matplotlib 绘图首先要导入 Matplotlib 组件 , 由于大部分绘图功能是在 matplotlib ...
- Java过滤器Filter的原理及配置_学习笔记
Filter中文意思为过滤器.顾名思义,过滤器可在浏览器以及目标资源之间起到一个过滤的作用.例如:水净化器,可以看成是生活中的一个过滤器,他可以将污水中的杂质过滤,从而使进入的污水变成净水. 对于WE ...
- JDBC之BaseDao类
package com.it.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Prep ...
- Laravel wxxcx 微信小程序获取用户信息
wxxcx 是Laravel5微信小程序登录获取用户信息扩展 部署 12345678 # 安装$ composer require iwanli/wxxcx# 注册服务# 在 /config/app. ...
- Unique Snowflakes(窗口滑动)
题目: Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devis ...
- (转载)Eclipse中使用SVN
为了方便个人使用,转载过来的,如需查阅,请前往原文地址:http://www.cnblogs.com/wvqusrtg/p/4993849.html 1.在Eclipse里下载Subclipse插件 ...
- Class file version does not support constant tag 16 in class file
启动服务时提示 Caused by: java.lang.ClassFormatError: Class file version does not support constant tag 16 i ...