侧边栏壁纸
  • 累计撰写 22 篇文章
  • 累计创建 7 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Centos 7 升级 Glibc-2.28

墨悠然
2023-09-04 / 0 评论 / 0 点赞 / 17 阅读 / 1801 字
温馨提示:
本文最后更新于 2023-09-04,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

升级 Glibc-2.28

下载并解压 glibc-2.28

wget https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz
tar -xf glibc-2.28.tar.xz -C /usr/local/
cd /usr/local/glibc-2.28/
#创建临时文件build
mkdir build
cd build/
../configure --prefix=/usr/local/glibc-2.28

这一步时, 发生了错误, 提示大致为

These critical programs are missing or too old: make compiler

升级gcc

yum install gcc -y    # 直接安装 GCC-8
yum -y install centos-release-scl
yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils
scl enable devtoolset-8 bash
echo "source /opt/rh/devtoolset-8/enable" >>/etc/profile   # 设置环境变量

升级make

wget http://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar -xzvf make-4.3.tar.gz
cd make-4.3   # 安装到指定目录
sudo ./configure
sudo make
sudo make install
sudo rm -rf /usr/bin/make
sudo cp ./make /usr/bin/
make -v

升级glibc-2.28

wget https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz
tar -xf glibc-2.28.tar.xz -C /usr/local
mkdir build
cd build/
yum install -y bison
sudo ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make #make 运行时间较长,可能会有半小时
sudo make install

通过strings /lib64/libc.so.6 |grep GLIBC查询是否存在glibc-2.28版本

strings /lib64/libc.so.6 | grep GLIBC
GLIBC_2.22GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_PRIVATE
...

0

评论区