安装依赖:
almalinux:
rpm --import
https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
yum install -y bzip2 python3 bison
安装gcc
yum groupinstall "Development Tools"
yum install glibc-headers
centos7:
yum install centos-release-scl scl-utils-build
yum install -y devtoolset-8-toolchain
scl enable devtoolset-8 bash
centos 8:
dnf install gcc
gcc --version
安装make(centos7)
wget
http://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2
tar -jxvf make-4.2.1.tar.bz2
cd make-4.2.1
./configure
make
sudo make install
sudo ln -s -f /usr/local/bin/make /usr/bin/make
# make -v
GNU Make 4.2.1
安装glibc
wget
http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.gz
tar xvf glibc-2.29.tar.gz
cd glibc-2.29
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --enable-obsolete-nsl
vi ../scripts/test-installation.pl 127行左右 增加行 && $name ne "nss_test2" 忽略对nss_test2的检查(主流做法,据说不影响安装及使用)
make
make install
检查:
strings /lib64/libc.so.6 |grep GLIBC_2.29
显示:
GLIBC_2.29
GLIBC_2.29
centos8、almaLinux8 glibc是2.28, make是4.2.1
参考:
https://www.zoleet.com/details/308.html
https://garlicspace.com/2020/07/18/centos7-%E5%8D%87%E7%BA%A7-glibc-gcc/
https://www.cnblogs.com/KBin/articles/Upgrade-GLIBC-for-Linux.html
https://cloud-atlas.readthedocs.io/zh-cn/latest/linux/redhat_linux/centos/upgrade_centos_7_to_8.html
https://blog.csdn.net/u014793522/article/details/123553248
debian10升级debian11
debian10 glibc是2.28,debian11 glibc是2.31
http://trustcomputing.com.cn/bbs/viewthread.php?tid=2037
[
本帖最后由 linda 于 2024-6-27 19:55 编辑 ]