CentOS下glibc更新

使用java -agentpath=xxx时报该错,提示glibc版本过低:version `GLIBC_2.14' not found (required by /data/jjns/UEISecurity_JVM.dll)。

查看当前glibc版本:

ll /lib64/libc.so.6
lrwxrwxrwx. 1 root root 12 Apr 14 16:14 /lib64/libc.so.6 -> libc-2.12.so

说明当前glibc版本为2.12,需要glibc2.14,于是进行glibc更新操作

1. 从glibc官网(http://ftp.gnu.org/gnu/glibc)下载源码包:glibc-2.14.tar.bz2及glibc-linuxthreads-2.5.tar.bz2。

2. 在任意目录新建文件夹,存放解压文件,例如:

mkdir /data/test

3. 进入新建的目录

cd /data/test

4. 解压源码包glibc-2.14.tar.bz2,并进入解压文件夹

tar -jxvf /home/xx/software/glibc-2.14.tar.bz2
cd glibc-2.14/

5. 解压源码包glibc-linuxthreads-2.5.tar.bz2

tar -jxvf /home/xx/software/glibc-linuxthreads-2.5.tar.bz2

6. 返回上级目录,重要

cd ..

7. 加上优化开关,否则会出现错误,必须用root用户

export CFLAGS="-g -O2"

8. 编译前配置参数

./glibc-2.14/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

9. 编译,执行很久,可能出错,出错再重新执行(我未出错)

make

10. 安装

make install

我遇到报错如下,但检查第11步显示仍然成功:

 1 Execution of gcc failed!
 2 The script has found some problems with your installation!
 3 Please read the FAQ and the README file and check the following:
 4 - Did you change the gcc specs file (necessary after upgrading from
 5   Linux libc5)?
 6 - Are there any symbolic links of the form libXXX.so to old libraries?
 7   Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
 8   libm.so should point to the newly installed glibc file - and there should be
 9   only one such link (check e.g. /lib and /usr/lib)
10 You should restart this script from your build directory after you've
11 fixed all problems!
12 Btw. the script doesn't work if you're installing GNU libc not as your
13 primary library!
14 make[1]: *** [install] Error 1
15 make[1]: Leaving directory `/usr/src/glibc'
16 make: *** [install] 错误 2

 

11. 检查更新后版本,显示2.14即更新成功

ll /lib64/libc.so.6
lrwxrwxrwx 1 root root 12 Jun 25 02:07 /lib64/libc.so.6 -> libc-2.14.so

 

参考文档:http://blog.csdn.net/rosen_luo/article/details/49450969

转载于:https://www.cnblogs.com/emberd/p/4952250.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值