glibc编译升级

glibc 升级

准备阶段

查看系统现有glibc版本

# /usr/lib64/libc.so.6
# rpm -qi glibc
# strings /lib64/libc.so.6|grep GLIBC
# ldd --version

下载新版的glibc安装包

安装包可到下面的网站去下载:http://ftp.gnu.org/gnu/glibc/
本次下载glibc-2.17.tar.gz版本,下载完成后将安装文件上传到服务器的/opt目录

安装glibc

解压安装包
# cd /opt
# tar xf glibc-2.17.tar.gz
# cd glibc-2.17 && mkdir build && cd build
编译glibc
# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
# make -j 8
安装glibc
# make install
安装完成后查看是否安装成功
# strings /lib64/libc.so.6 |grep GLIBC
	[root@waf ~]# strings /lib64/libc.so.6 |grep GLIBC
	GLIBC_2.2.5
	GLIBC_2.2.6
	GLIBC_2.3
	GLIBC_2.3.2
	GLIBC_2.3.3
	GLIBC_2.3.4
	GLIBC_2.4
	GLIBC_2.5
	GLIBC_2.6
	GLIBC_2.7
	GLIBC_2.8
	GLIBC_2.9
	GLIBC_2.10
	GLIBC_2.11
	GLIBC_2.12
	GLIBC_2.13
	GLIBC_2.14
	GLIBC_2.15
	GLIBC_2.16
	GLIBC_2.17
	GLIBC_PRIVATE
# ldd --version
	[root@waf ~]# 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.
	由 Roland McGrath 和 Ulrich Drepper 编写。
# ll /lib64/libc.so.6
	[root@waf ~]# ll /lib64/libc.so.6 
	lrwxrwxrwx. 1 root root 12 6月   2 14:46 /lib64/libc.so.6 -> libc-2.17.so

[root@kylin opt]# /usr/lib64/libc.so.6 
GNU C Library (GNU libc) stable release version 2.28.
Copyright (C) 2018 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.
Compiled by GNU CC version 7.3.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值