yum安装软件报错Segmentation fault处理

yum安装软件报错Segmentation fault处理

在使用yum 更新软件时提示:
Segmentation fault

中文错误提示: 段错误

[root@CMS-BAK:/usr/local/lib]# yum install -y screen
Freeing read locks for locker 0x2f: 13195/140686785021696
Freeing read locks for locker 0x31: 13195/140686785021696
Freeing read locks for locker 0x32: 13195/140686785021696
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'apt.sw.be'"
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Segmentation fault

可能是手动编译安装了zlib,并且修改/etc/ld.so.conf,加入/usr/local/lab

导致系统里面有两个版本的zlib,使用ldconfig -v|grep libz 可查看到两个版本的zlib,

[root@CMS-BAK:/usr/local/lib]# ldconfig -v|grep libz
ldconfig: Can't stat /usr/local/lab/libevent-2.0.21-stable/lib: No such file or directory
libz.so.1 -> libz.so.1.2.5
libz.so.1 -> libz.so.1.2.3
[root@CMS-BAK:/usr/local/lib]# find / -name 'libz.so.1'
/lib64/libz.so.1
/usr/local/lib/libz.so.1
/usr/local_bak/lib/libz.so.1
/usr/local_source/zlib-1.2.5/lib/libz.so.1

于是,注释掉/etc/ld.so.conf里面的zlib:
[root@CMS-BAK:/data/mysql_data]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
#####ADD BY lx#####
/usr/local/BerkeleyDB-4.8.30/lib
/usr/local/lab/ltp-full-20140115/lib
/usr/local/mysql/lib
/usr/local/lab/openssl/lib
/usr/local/lab/libevent-2.0.21-stable/lib
/usr/local/so
/usr/local/lab
#/usr/local/lib // 注释掉

执行一次 ldconfig

执行 yum clean all

yum install screen -y

可以了

上一篇:(转)Java并发编程:深入剖析ThreadLocal


下一篇:Java并发编程:深入剖析ThreadLocal