zoukankan      html  css  js  c++  java
  • CentOS7下升级GLIBC2.31

    1、当前系统版本及GLIBC版本信息

    [root@localhost ~]# cat /etc/redhat-release

    CentOS Linux release 7.6.1810 (Core)

    [root@localhost ~]# uname -r

    3.10.0-957.el7.x86_64

    [root@localhost ~]# strings /lib64/libc.so.6 | grep GLIBC

    [root@localhost ~]# ll /lib64/libc.so*


    2、源码编译升级gcc9.3.0

    1)编译升级gcc

    wget https://mirrors.aliyun.com/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz

    cp gcc-9.3.0.tar.gz /opt

    cd /opt

    tar -zxf gcc-9.3.0.tar.gz

    cd gcc-9.3.0/

    ./contrib/download_prerequisites

    建议先手动下载依赖的这四个包,下载地址ftp://gcc.gnu.org/pub/gcc/infrastructure/

    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


    2)升级成功后gcc版本检查

    cd /usr/lib64

    ll libstdc++*

    gcc -v

    gcc --version


    3、源码编译升级make

    1)编译升级make

    wget https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz

    cp make-4.3.tar.gz /opt

    cd /opt/

    tar -zxf make-4.3.tar.gz

    cd make-4.3/

    mkdir build

    cd build

    ../configure --prefix=/usr && make && make install


    2)检查升级后的make版本信息

    make -v


    4、升级glibc-2.31

    cd /opt

    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

    make -j6

    make install

    make localedata/install-locales

    报错是由于python版本较低

    下面yum install python3解决后重新配置并make编译安装

    ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror

    make -j6

    make install

    最后验证升级后的glibc版本

    strings /lib64/libc.so.6 | grep GLIBC

    ll /lib64/libc.so*

  • 相关阅读:
    2008年具有高校自主选拔录取资格的考生名单 江苏版
    OpenGL ES 2.0 for iPhone Tutorial
    Mathematica三维点插值算法(高维插值,多维插值)
    Mathematica颜色系,你喜欢哪一个?
    Khronos EGL and Apple EAGL
    ssh 免密码登陆配置
    2008年高考招生:北京大学自主选拔录取资格考生名单
    PlotLegends 应用
    Mathematica 如何更改文档的样式
    您为何而工作?
  • 原文地址:https://www.cnblogs.com/hahahehexixihoho/p/15305445.html
Copyright © 2011-2022 走看看