Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2830930
  • 博文数量: 599
  • 博客积分: 16398
  • 博客等级: 上将
  • 技术积分: 6875
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-30 12:04
个人简介

WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606

文章分类

全部博文(599)

文章存档

2014年(12)

2013年(56)

2012年(199)

2011年(105)

2010年(128)

2009年(99)

分类: LINUX

2013-04-07 15:44:24

今天在做HADOOP的时候,安装JDK 1.7需要libc-2.4以上的版本,本着试试的想法,
从其他机器上COPY了一个libc-2.5.so,然后对libc.so.6重新做了一个软连接,
这一搞导致系统基本不能用了,所有的命令都报:
relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference.


破坏步骤比较简单:


[root@sxtest01 tls]# mv /tmp/libc-2.5.so  .
[root@sxtest01 tls]# ls -ltr
total 3552
-rwxr-xr-x  1 root root   32012 Jan 31  2007 libthread_db-1.0.so
-rwxr-xr-x  1 root root   50672 Jan 31  2007 librt-2.3.4.so
-rwxr-xr-x  1 root root  107800 Jan 31  2007 libpthread-2.3.4.so
-rwxr-xr-x  1 root root  213772 Jan 31  2007 libm-2.3.4.so
-rwxr-xr-x  1 root root 1529008 Jan 31  2007 libc-2.3.4.so  <--这个是老的
-rw-rw-r--  1 root root 1598712 Apr 11  2008 libc-2.5.so               <--这个是我新复制过来的
lrwxrwxrwx  1 root root      19 Jul 27  2008 libthread_db.so.1 -> libthread_db-1.0.so
lrwxrwxrwx  1 root root      14 Jul 27  2008 librt.so.1 -> librt-2.3.4.so
lrwxrwxrwx  1 root root      19 Jul 27  2008 libpthread.so.0 -> libpthread-2.3.4.so
lrwxrwxrwx  1 root root      13 Jul 27  2008 libm.so.6 -> libm-2.3.4.so
lrwxrwxrwx  1 root root      13 Jul 27  2008 libc.so.6 -> libc-2.3.4.so
drwxr-xr-x  3 root root    4096 Dec 22  2009 i686
drwxr-xr-x  2 root root    4096 Dec 22  2009 i586
drwxr-xr-x  2 root root    4096 Dec 22  2009 i486
[root@sxtest01 tls]# rm libc.so.6
rm: remove symbolic link `libc.so.6'? y
[root@sxtest01 tls]# ln -s libc-2.5.so libc.so.6  <--重新对 libc.so.6做了一个软连接
[root@sxtest01 tls]# ll
ls: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
[root@sxtest01 tls]# ls -ltr
ls: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
[root@sxtest01 tls]# ls -ltr
ls: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
[root@sxtest01 tls]# ll
ls: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
[root@sxtest01 tls]# rm libc.so.6
rm: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
[root@sxtest01 tls]# mv libc.so.6 /tmp
mv: relocation error: /lib/tls/libc.so.6: symbol _dl_tls_get_addr_soft, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference



这个时候最好不要重启OS,否则就麻烦了。

恢复步骤如下:


[root@sxtest01 tls]# export LD_PRELOAD=/lib/tls/libc-2.3.6.so
[root@sxtest01 tls]# ls -ltr
total 3552
-rwxr-xr-x  1 root root   32012 Jan 31  2007 libthread_db-1.0.so
-rwxr-xr-x  1 root root   50672 Jan 31  2007 librt-2.3.4.so
-rwxr-xr-x  1 root root  107800 Jan 31  2007 libpthread-2.3.4.so
-rwxr-xr-x  1 root root  213772 Jan 31  2007 libm-2.3.4.so
-rwxr-xr-x  1 root root 1529008 Jan 31  2007 libc-2.3.4.so
-rw-rw-r--  1 root root 1598712 Apr 11  2008 libc-2.5.so
lrwxrwxrwx  1 root root      19 Jul 27  2008 libthread_db.so.1 -> libthread_db-1.0.so
lrwxrwxrwx  1 root root      14 Jul 27  2008 librt.so.1 -> librt-2.3.4.so
lrwxrwxrwx  1 root root      19 Jul 27  2008 libpthread.so.0 -> libpthread-2.3.4.so
lrwxrwxrwx  1 root root      13 Jul 27  2008 libm.so.6 -> libm-2.3.4.so
drwxr-xr-x  3 root root    4096 Dec 22  2009 i686
drwxr-xr-x  2 root root    4096 Dec 22  2009 i586
drwxr-xr-x  2 root root    4096 Dec 22  2009 i486
lrwxrwxrwx  1 root root      11 Apr  7 13:48 libc.so.6 -> libc-2.5.so
[root@sxtest01 tls]# rm libc.so.6
rm: remove symbolic link `libc.so.6'? y
[root@sxtest01 tls]# ln -s /lib/tls/libc-2.3.4.so /lib/tls/libc.so.6

终于搞好了,虚惊了一场。

阅读(26791) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~