关于glibc:CentOS-69-升级-glibc-212-到-217qbit

28次阅读

共计 2046 个字符,预计需要花费 6 分钟才能阅读完成。

前言

  • 以后日期是 2022.7.6,CentOS 6 进行保护更新日期是 2020.11.30,CentOS 6 已进行保护近两年
  • 因为种种原因,qbit 须要在 CentOS 6.9 上通过 Miniconda 装置 Python 3.8,发现 glibc 版本太旧装不上,于是试验降级了 glibc
  • 初始环境

    CentOS 6.9 x86_64
    glibc 2.12

步骤

  • 间接装置 MiniConda3 报错

    $ sh Miniconda3-py38_4.12.0-Linux-x86_64.sh 
    WARNING:
      The installer is not compatible with the version of the Linux distribution
      installed on your system. The version of GLIBC is no longer supported.
      Found version 2.12, which is less than 2.17
    Aborting installation.
    
  • 查看以后 glibc 版本

    $ ldd --version
    ldd (GNU libc) 2.12
    Copyright (C) 2010 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.
    由 Roland McGrath 和 Ulrich Drepper 编写。
  • 切换软件仓库(centos-vault 源)

     curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
  • 生成缓存

    yum makecache
  • 用 github 上的脚本降级 glibc,脚本内容如下

    #!/bin/bash
    
    # update glibc to 2.17 for CentOS 6
    
    GLIBC=glibc
    OS=el6
    SERVER=https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6
    VERSION=2.17-55
    FULL_VERSION=$GLIBC-$VERSION.fc20
    X64=x86_64
    I386=i386
    I636=i686
    REPO_32=epel-6-$I386
    REPO_64=epel-6-$X64
    
    SERVER_32=$SERVER/$REPO_32/$FULL_VERSION
    RPM_32=$VERSION.$OS.$I636.rpm
    SERVER_64=$SERVER/$REPO_64/$FULL_VERSION
    RPM_64=$VERSION.$OS.$X64.rpm
    
    # Packages
    P_1=$GLIBC
    P_2=$GLIBC-common
    P_3=$GLIBC-devel
    P_4=$GLIBC-headers
    P_5=$GLIBC-static
    P_6=$GLIBC-utils
    P_7=nscd
    
    # Required as dependency of glibc-utils
    sudo yum install --assumeyes gd
    
    # 64-bit
    sudo rpm -Uvh --force $SERVER_64/$P_1-$RPM_64 $SERVER_64/$P_2-$RPM_64 $SERVER_64/$P_3-$RPM_64 $SERVER_64/$P_4-$RPM_64 $SERVER_64/$P_5-$RPM_64 $SERVER_64/$P_6-$RPM_64 $SERVER_64/$P_7-$RPM_64
    # Print out versions
    strings /lib64/libc.so.6 | grep GLIBC
  • 再次查看以后 glibc 版本(不必重启)

    $ ldd --version
    ldd (GNU libc) 2.17
    Copyright (C) 2012 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.
    Written by Roland McGrath and Ulrich Drepper.
  • 失常装置 Miniconda3

    $ sh Miniconda3-py38_4.12.0-Linux-x86_64.sh 
    
    Welcome to Miniconda3 py38_4.12.0
    
    In order to continue the installation process, please review the license
    agreement.
    Please, press ENTER to continue
    >>> 

本文出自 qbit snap

正文完
 0