centos7下升级GLIBC2.31

先决条件:
      升级gcc9.3.0
      升级make4.3

查看当前系统版本即GLIBC信息
  $ cat /etc/redhat-release 
  CentOS Linux release 7.4.1708 (Core)
  
  $strings /lib64/libc.so.6 | grep GLIBC
  

1,编译升级gcc
   $ wget https://mirrors.aliyun.com/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
   $ tar -zxvf gcc-9.3.0.tar.gz
   $ cd gcc-9.3.0/
   $ ./contrib/download_prerequisites
   $ cat /proc/cpuinfo| grep "processor"| wc -l
   $ mkdir build
   $ cd build
   $ ../configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
   $ make -j6
   $ make install
升级后gcc版本检查
   $ gcc --version
   gcc (GCC) 9.3.0
   Copyright (C) 2019 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.
   
2,编译升级make
  $ wget https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz
  $ tar -zxf make-4.3.tar.gz 
  $ mkdir build
  $ cd build
  $ ../configure --prefix=/usr && make && make install
检查升级后make版本信息
  $ make -v
  GNU Make 4.3
  Built for x86_64-pc-linux-gnu
  Copyright (C) 1988-2020 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

   
3,升级glibc-2.3.1
  $ wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.31.tar.gz
  $ tar -zxf glibc-2.31.tar.gz
  $ cd glibc-2.31/
  $ cat INSTALL | grep -E "newer|later"
  $ mkdir build
  $ cd build
  $ ../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror
  # yum install python3   //如果编译时出现报错可能时python版本过低,升级一下重新编译即可
  $ make -j6
  $ make install
  $ make localedata/install-locales
   
   
最后验证升级后的glibc版本
  $ strings /lib64/libc.so.6 | grep GLIBC
  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_2.13
  GLIBC_2.14
  GLIBC_2.15
  GLIBC_2.16
  GLIBC_2.17
  GLIBC_2.18
  GLIBC_2.22
  GLIBC_2.23
  GLIBC_2.24
  GLIBC_2.25
  GLIBC_2.26
  GLIBC_2.27
  GLIBC_2.28
  GLIBC_2.29
  GLIBC_2.30

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值