升级原因

安装saltstack出现报错:

Error: Package: PyYAML-3.11-1.el7.x86_64 (salt-latest)

Requires: libc.so.6(GLIBC_2.14)(64bit)

查看当前glibc版本:

# rpm -qa | grep glibc

glibc-headers-2.12-1.209.el6_9.2.x86_64

glibc-common-2.12-1.209.el6_9.2.x86_64

glibc-devel-2.12-1.209.el6_9.2.x86_64

glibc-2.12-1.209.el6_9.2.x86_64

查看当前系统中是否有libc.so.6模块以及支持glibc版本:

# find / -name libc.so.6

/lib64/libc.so.6

# strings /lib64/libc.so.6 | grep GLIB

GLIBC_2.2.5

GLIBC_2.2.6

GLIBC_2.3

GLIBC_2.3.2

GLIBC_2.3.3

GLIBC_2.3.4

GLIBC_2.4

GLIBC_2.5

GLIBC_2.6

GLIBC_2.7

GLIBC_2.8

GLIBC_2.9

GLIBC_2.10

GLIBC_2.11

GLIBC_2.12

GLIBC_PRIVATE

最高支持GLIBC_2.12

升级glibc

官网 选择合适版本下载glibc

所需软件包

We recommend installing the following GNU tools before attempting to

build the GNU C Library:

* GNU 'make' 3.79 or newer

* GCC 4.9 or newer

* GNU 'binutils' 2.25 or later

* GNU 'texinfo' 4.7 or later

* GNU 'awk' 3.1.2, or higher

* Perl 5

* GNU 'sed' 3.02 or newer

* GNU 'autoconf' 2.69 (exactly)

* GNU 'gettext' 0.10.36 or later

* GNU 'bison' 2.7 or later

一般CentOS6自带的gcc都是4.4上下,如果需要更新到4.9及一上,可以查看《gcc 4.4.7 升级到4.9》

编译安装

创建编译目录

# mkdir -p Gcc/{gcc-src,gcc-obj}

gcc-src为源码文件路径,gcc-obj为编译路径

# cd Gcc/gcc-obj

# ../gcc-src/configure --prefix=/usr

checking build system type... x86_64-pc-linux-gnu

checking host system type... x86_64-pc-linux-gnu

checking target system type... x86_64-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether ln works... yes

checking whether ln -s works... yes

checking for a sed that does not truncate output... /bin/sed

checking for gawk... gawk

checking for libatomic support... yes

checking for libcilkrts support... yes

checking for libitm support... yes

checking for libsanitizer support... yes

checking for libvtv support... yes

checking for libmpx support... yes

checking for libhsail-rt support... yes

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking whether g++ accepts -static-libstdc++ -static-libgcc... no

checking for gnatbind... no

checking for gnatmake... no

checking whether compiler driver understands Ada... no

checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2

checking for objdir... .libs

configure: WARNING: using in-tree isl, disabling version check

The following languages will be built: c,c++,fortran,lto,objc

*** This configuration is not supported in the following subdirectories:

gnattools gotools target-libada target-libhsail-rt target-libgo target-libffi target-liboffloadmic

(Any other directories should still work fine.)

checking for default BUILD_CONFIG...

checking for --enable-vtable-verify... no

/usr/bin/ld: cannot find crti.o: No such file or directory

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: cannot find -lgcc_s

/usr/bin/ld: cannot find -lc

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: cannot find -lgcc_s

/usr/bin/ld: cannot find crtn.o: No such file or directory

collect2: ld returned 1 exit status

configure: error: I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.

如果出现上面报错,可能由于没有装32bit lib库,添加--disable-multilib参数即可解决:

# ../gcc-src/configure --prefix=/usr ***--disable-multilib***

或者安装:

# yum install -y libgcc.i686 libgcc-devel.i686

安装

# make

# make install

- 其他报错

configure: error: `GMPLIBS' has changed since the previous run:

之前有编译过gcc,但是没有编译成功,解决办法:

删除gcc-obj目录,重新编译

linux glibc2.12编译,glibc 2.12 升级 2.14相关推荐

  1. linux系统嵌入式编译环境,Ubuntu 12.04嵌入式交叉编译环境arm-linux-gcc搭建过程图解...

    Linux版本:Ubuntu 12.04 内核版本:Linux 3.5.0 交叉编译器版本:arm-linux-gcc-4.4.3 交叉编译器下载 见这篇文章http://www.linuxidc.c ...

  2. linux glibc2.12到2.14升级

    linux centos glibc 2.12 到 2.14 有些软件可能要求系统的 Glibc 高于某个版本才可以正常运行.如果您的 Glibc 低于要求的版本,为了运行这些软件,您就不得不升级您的 ...

  3. 自己动手搭建 Linux 0.12 编译环境 — Linux主机

    Hi,又见面了,这两天事情比较少,所以又快速构思这篇的内容. 上篇我用极简模式说完了关于Linux 0.12的模拟环境Bochs,这篇同样沿袭上篇的思路,不过主要内容是关于Linux主机.在搭建Lin ...

  4. linux需要的GLIBCXX版本,Linux下GLIBCXX和GLIBC版本低造成的编译错误的解决方案

    最近在给编译环境CentOS 6.5安装新版clang (clang 3.4/3.5)的时候,虽然已经装了gcc 4.9.1, 但编译的时候(参考clang官方主页http://clang.llvm. ...

  5. Linux 第20天: (09月12日) Linux启动和内核管理

    Linux 第20天: (09月12日) Linux启动和内核管理 本章内容 CentOS 5和6的启动流程 服务管理 Grub管理 自制Linux 启动排错 编译安装内核 Linux组成 Linux ...

  6. 红帽linux 下qt 5.13.1 编译 mysql80驱动(内含升级gcc版本)

    前言: 本地一台redhat linux虚拟机已经安装了qt5.13.1以及mysql80 详细的安装流程可通过如下链接查看 linux 安装qt    安装mysql 在qt的数据库编程阶段,需要对 ...

  7. Centos7 64位 -- glibc-2.29 编译升级方法(已成功)

    某软件出现漏洞,需要升级解决(忘了哪个)结果提示glibc版本过低. 懵懂无知的我以为glibc想其他软件一样编译升级一下就好.. 结果? 重装系统! 说真的,如非必要(或学习),请勿升级 glibc ...

  8. 制作U盘启动盘将Ubuntu 12.04升级为14.04的方法

    1 介绍 在周六的下午,我决定想高速浏览一下书籍[1].看看这个关于Ubuntu的圣经到底在讲什么东东. 感觉讲的不错,当我看到介绍文件标记语言-TeX和LaTeX的时候,该书作者推荐在Ubuntu上 ...

  9. Linux就这个范儿 第12章 一个网络一个世界

    Linux就这个范儿 第12章 一个网络一个世界 与Linux有缘相识还得从一项开发任务说起.十八年前,我在Nucleus  OS上开发无线网桥AP,需要加入STP生成树协议(SpanningTree ...

最新文章

  1. Nginx+uWSGI+Django原理
  2. 把字符串转换为日期时间
  3. 用MATLAB画桌子,怎样用matlab编写桌子的动态变化图
  4. python中sorted函数逆序_Python中sorted函数的用法(转)
  5. Exp4 恶意代码分析 20164303 景圣
  6. Java的知识点20——包装类基本知识、包装类的用途、自动装箱和拆箱、包装类的缓存问题
  7. 2007年抓的兔子太多了,结果没抓到一个。
  8. ASP.NET Core快速入门(第3章:依赖注入)--学习笔记
  9. linux磁盘资源,liunxCPU和内存,磁盘等资源,
  10. 【tensorflow】常量张量的初始化
  11. Spring boot (2)--- 基础
  12. 跨境电商shopify独立站如何引流量
  13. Ajax基础(五)--封装库
  14. 泛微E8创建自定义文档
  15. 燃气行业引入电子签章推动燃气销售合同线上签署
  16. NIK插件-托马斯教程1-color efex pro 4
  17. 考研政治刷题知识点总结
  18. 设为首页 加入收藏 html,js设为首页和加入收藏代码(兼容所有浏览器)
  19. Pytorch入门教程学习笔记(六)循环神经网络RNN(学周杰伦写歌)
  20. oracle创建数据库的先决条件,Oracle数据库安装先决条件检查失败解决方案

热门文章

  1. WMA、MP3音质对比
  2. 基于VR技术的输电线路巡检仿真系统
  3. C# 依赖注入 MEF
  4. CS..........................
  5. Java基础(十五)IO流---字符流(Reader、Writer)、字节流(InputStream、OutputStream)
  6. 【VC++技术杂谈002】打印技术之获取及设置系统默认打印机
  7. 图论与图学习(一):图的基本概念
  8. linux模拟无限重启
  9. 大视频时代,网络电视台建设运营思路技术基础架构建议
  10. 金仓数据库KingbaseES高可用概述