报错原因:
Error loading Python lib '/opt/pyxrayai/libpython3.8.so.1.0': dlopen: /lib64/libm.so.6: version `GLIBC_2.29' not found
之前尝试过各种升级方式,最后导致系统命令无法使用,重启也不能正常进入系统,写下文档方便少踩一些坑,已经成功升级到glibc2.29版本
解决步骤:将glibc2.28 升级到2.29
步骤
1:yum update ---重要
2:rpm -q glibc ---查看
输出:glibc-2.28-189.el8.x86_64
3:ldd --version ---查看
输出:ldd (GNU libc) 2.28
4:make -v ---查看,版本过低考虑升级版本
输出:GNU Make 4.2.1
5: gcc -v ---查看,版本过低考虑升级版本
输出:gcc version 8.5.0 20210514 (Red Hat 8.5.0-10) (GCC)
6:python3 -V ---查看
输出:Python 3.6.8
安装glibc-2.29
7:cd /opt
8:wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.29.tar.gz
9:tar -xvf glibc-2.29.tar.gz
10:cd glibc-2.29
11:mkdir build
12:cd build
13:../configure --prefix=/usr
14:make -j4
15:sudo make install
15步执行完之后提示如下:
截取最后一部分
/opt/glibc-2.29/build/elf/sln /opt/glibc-2.29/build/elf/symlink.list
rm -f /opt/glibc-2.29/build/elf/symlink.list
test ! -x /opt/glibc-2.29/build/elf/ldconfig || LC_ALL=C \
/opt/glibc-2.29/build/elf/ldconfig \
/lib64 /usr/lib64
LD_SO=ld-linux-x86-64.so.2 CC="gcc" /usr/bin/perl scripts/test-installation.pl /opt/glibc-2.29/build/
/bin/ld: cannot find -lnss_nis
/bin/ld: cannot find -lnss_nisplus
collect2: error: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
make[1]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/opt/glibc-2.29'
make: *** [Makefile:12:install] 错误 2
有两个错误也没有关系
重启机器查看版本
16:ldd --version
输出:ldd (GNU libc) 2.29
成功