博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
libsasl2.so.2无法找到,apache无法启动
阅读量:6226 次
发布时间:2019-06-21

本文共 3002 字,大约阅读时间需要 10 分钟。

客户的服务器在过年时,被火烧掉了,客户找数据恢复公司恢复出来了数据,但是应用还是无法访问,最后到了apache这里,apache2 无法启动, 说libsasl2.so.2 找不到,apache 无法启动.

解决方法: 
# whereis httpd 
找出你的httpd 的安装绝对路径. 如 /usr/sbin/httpd

#ldd /usr/sbin/httpd 

libpcre.so.0 => /lib/libpcre.so.0 (0xf6f8a000) 
libpcreposix.so.0 => /usr/lib/libpcreposix.so.0 (0xf6f86000) 
libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0xf6f72000) 
libldap-2.2.so.7 => /usr/lib/libldap-2.2.so.7 (0xf6f41000) 
liblber-2.2.so.7 => /usr/lib/liblber-2.2.so.7 (0xf6f35000) 
libdb-4.2.so => /lib/tls/i686/libdb-4.2.so (0xf6e67000) 
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xf6e48000) 
libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0xf6e25000) 
librt.so.1 => /lib/tls/librt.so.1 (0xf6e11000) 
libm.so.6 => /lib/tls/libm.so.6 (0xf6dee000) 
libcrypt.so.1 => /lib/libcrypt.so.1 (0xf6dc0000) 
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xf6dae000) 
libdl.so.2 => /lib/libdl.so.2 (0xf6daa000) 
libc.so.6 => /lib/tls/libc.so.6 (0xf6c82000) 
libresolv.so.2 => /lib/libresolv.so.2 (0xf6c6e000) 
libsasl2.so.2 => not found 
libssl.so.4 => /lib/libssl.so.4 (0xf6c26000) 
libcrypto.so.4 => /lib/libcrypto.so.4 (0xf6b3e000) 
/lib/ld-linux.so.2 (0xf6fab000) 
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xf6b29000) 
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xf6ac4000) 
libcom_err.so.2 => /lib/libcom_err.so.2 (0xf6ac1000) 
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xf6aa0000) 
libz.so.1 => /usr/lib/libz.so.1 (0xf6a90000)

#whereis libsasl2.so.2 
/usr/local/lib/libsasl2.so.2

/usr/local/lib/libsasl2.so.2.0.21

ls -l /usr/local/lib/libsasl2.so.2 

发现 /usr/local/lib/libsasl2.so.2==>/usr/local/lib/libsasl2.so.2.0.21

所以 ln -s /usr/local/lib/libsasl2.so.2.0.21 /lib/libsasl2.so.2

然后再检查一下:#ldd /usr/sbin/httpd

libpcre.so.0 => /lib/libpcre.so.0 (0xf6f8a000) 

libpcreposix.so.0 => /usr/lib/libpcreposix.so.0 (0xf6f86000) 
libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0xf6f72000) 
libldap-2.2.so.7 => /usr/lib/libldap-2.2.so.7 (0xf6f41000) 
liblber-2.2.so.7 => /usr/lib/liblber-2.2.so.7 (0xf6f35000) 
libdb-4.2.so => /lib/tls/i686/libdb-4.2.so (0xf6e67000) 
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xf6e48000) 
libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0xf6e25000) 
librt.so.1 => /lib/tls/librt.so.1 (0xf6e11000) 
libm.so.6 => /lib/tls/libm.so.6 (0xf6dee000) 
libcrypt.so.1 => /lib/libcrypt.so.1 (0xf6dc0000) 
libpthread.so.0 => /lib/tls/libpthread.so.0 (0xf6dae000) 
libdl.so.2 => /lib/libdl.so.2 (0xf6daa000) 
libc.so.6 => /lib/tls/libc.so.6 (0xf6c82000) 
libresolv.so.2 => /lib/libresolv.so.2 (0xf6c6e000) 
libsasl2.so.2 => /lib/libsasl2.so.2 (0xf6c5a000) 
libssl.so.4 => /lib/libssl.so.4 (0xf6c26000) 
libcrypto.so.4 => /lib/libcrypto.so.4 (0xf6b3e000) 
/lib/ld-linux.so.2 (0xf6fab000) 
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xf6b29000)

libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xf6ac4000) 

libcom_err.so.2 => /lib/libcom_err.so.2 (0xf6ac1000) 
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xf6aa0000) 
libz.so.1 => /usr/lib/libz.so.1 (0xf6a90000)

重新启动 httpd , OK 了.

本文转自南非蚂蚁51CTO博客,原文链接:http://blog.51cto.com/ixdba/526104 ,如需转载请自行联系原作者

你可能感兴趣的文章
qdoj.xyz 6.22
查看>>
js随机背景颜色
查看>>
NTFS文件系统简介
查看>>
[IOC]Unity使用
查看>>
PUTTY的使用教程
查看>>
永远的经典-意大利波伦塔蛋糕Polenta Cake
查看>>
[转载] C#面向对象设计模式纵横谈——22 State状态模式
查看>>
HDOJ_ACM_Max Sum
查看>>
LeetCode 141, 142. Linked List Cycle I+II
查看>>
管道函数
查看>>
14.多线程设计模式 - Master-Worker模式
查看>>
机器学习实战——k-近邻算法
查看>>
设计模式——单例模式
查看>>
240. Search a 2D Matrix II
查看>>
php-预定义
查看>>
IntelliTrace 调试、定位异常
查看>>
linux Shell脚本编码格式
查看>>
String方法
查看>>
冲刺第五天
查看>>
php操作mysql与sqlite类
查看>>