发新话题
打印

ubuntu linux升级glibc版本到2.33

ubuntu linux升级glibc版本到2.33

ubuntu 20升级glibc版本到2.33做法(危险!请勿尝试,可能导致kernel panic)

查看glibc当前版本:
# ldd --version
# ls -l /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 Dec 16  2020 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so
# strings /lib/x86_64-linux-gnu/libc.so.6 |grep GLIBC_

查看各发行本glibc最高版本
https://pkgs.org/download/glibc
https://www.ubuntuupdates.org/package/core/hirsute/universe/base/glibc
https://tracker.debian.org/pkg/glibc

警告:Please do not attempt to update glibc outside of yum or using foreign, non-CentOS, packages. You will break your system to the reinstall point if you try.


# ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm

# wget http://ftp.gnu.org/gnu/glibc/glibc-2.33.tar.gz
# tar -xvf glibc-2.33.tar.gz
# cd glibc-2.33
# mkdir build; cd build
# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
# make
# make install (危险!,参考 https://sourceware.org/glibc/wiki/Testing/Builds

执行新ldconfig(Inconsistency detected by ld.so: dl-call-libc-early-init.c: 37: _dl_call_libc_early_init: Assertion `sym != NULL' failed!)
# /sbin/ldconfig


查看版本,发现已升级到2.33版本
# ldd --version
ldd (GNU libc) 2.33
# ldconfig -p|grep libc.so.6
        libc.so.6 (libc6,x86-64, OS ABI: Linux 3.2.0) => /lib64/libc.so.6
# ls -l /lib64/libc.so.6
lrwxrwxrwx 1 root root 12 Jul 19 12:06 /lib64/libc.so.6 -> libc-2.33.so
# strings /lib64/libc-2.33.so |grep GLIBC_
# ls -l /lib64/libc-2.33.so

参考:
https://sourceware.org/glibc/wiki/Testing/Builds

https://www.cnblogs.com/kevingrace/p/8744417.html

https://www.huaweicloud.com/articles/4b9f086d121ded5d28a9d20583734bbf.html

[ 本帖最后由 linda 于 2021-7-19 19:51 编辑 ]

TOP

发新话题