error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
来源:互联网 发布:wkwebview js交互 oc 编辑:程序博客网 时间:2024/06/05 07:13
启动memcached报错
/usr/local/memcached/bin/memcached -u root -p 11211 -m 2048m -d
/usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
排查方法
[root@cmjs-live02-6312 memcached-1.4.5]# ldd /usr/local/memcached/bin/memcached
linux-vdso.so.1 => (0x00007fff6c7ff000)
libevent-2.0.so.5 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036d6400000)
libc.so.6 => /lib64/libc.so.6 (0x00000036d6000000)
/lib64/ld-linux-x86-64.so.2 (0x00000036d5800000)
注: ldd能够显示可执行模块的dependency,其原理是通过设置一系列的环境变量,可以定位报错库文件
[root@cmjs-live02-6312 memcached-1.4.5]# whereis libevent-2.0.so.5 ##查找现有库文件libevent-2.0.so.5的路径
libevent-2.0.so: /usr/lib/libevent-2.0.so.5 /usr/local/lib/libevent-2.0.so.5
[root@cmjs-live02-6312 memcached-1.4.5]# LD_DEBUG=libs ./memcached -v ##跟踪运行memcached所有加载库文件的路径
13464: find library=libevent-2.0.so.5 [0]; searching
13464: search cache=/etc/ld.so.cache
13464: search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64(system search path)
13464: trying file=/lib64/tls/x86_64/libevent-2.0.so.5
13464: trying file=/lib64/tls/libevent-2.0.so.5
13464: trying file=/lib64/x86_64/libevent-2.0.so.5
13464: trying file=/lib64/libevent-2.0.so.5
13464: trying file=/usr/lib64/tls/x86_64/libevent-2.0.so.5
13464: trying file=/usr/lib64/tls/libevent-2.0.so.5
13464: trying file=/usr/lib64/x86_64/libevent-2.0.so.5
13464: trying file=/usr/lib64/libevent-2.0.so.5
13464:
./memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
在查找以上所有路径未果后报错,解决方法只要将上述路径的一个做个软连接即可
[root@cmjs-live02-6312 memcached-1.4.5]# ln -s /usr/lib/libevent-2.0.so.5 /lib64/libevent-2.0.so.5
[root@cmjs-live02-6312 memcached-1.4.5]# ldd /usr/local/memcached/bin/memcached ##验证库文件是否找到
linux-vdso.so.1 => (0x00007fffda5ff000)
libevent-2.0.so.5 => /lib64/libevent-2.0.so.5 (0x00007f9699a93000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036d6400000)
libc.so.6 => /lib64/libc.so.6 (0x00000036d6000000)
librt.so.1 => /lib64/librt.so.1 (0x00000036d6800000)
/lib64/ld-linux-x86-64.so.2 (0x00000036d5800000)
[root@cmjs-live02-6312 memcached-1.4.5]# /usr/local/memcached/bin/memcached -u root -p 11211 -m 2048m -d
[root@cmjs-live02-6312 memcached-1.4.5]# ps -ef |grep memcache
root 14814 1 0 16:28 ? 00:00:00 /usr/local/memcached/bin/memcached -u root -p 11211 -m 2048m -d
- error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
- error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
- error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
- error: while loading shared libraries : countlib.so : cannnot open shared object file : No such fil
- 错误解决 error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such fil
- Linux运行错误:error while loading shared libraries: xxx.so.0:cannot open shared object file: No such fil
- 错误提示:error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such fil
- error while loading shared libraries: libXX-2.0.so.5: cannot open shared object file: No such file
- error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file
- memcached: error while loading shared libraries:libevent-2.0.so.5: cannot open shared object file:
- error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such fi
- error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file
- error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file
- error while loading shared libraries: libssl.so.4: cannot open shared object file: No such file.....
- error while loading shared libraries: libiw.so.29: cannot open shared object file: No such file
- error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file
- error while loading shared libraries: XXX.so: cannot open shared object file: No such file...
- jps: error while loading shared libraries: libjli.so: cannot open shared object file: No such file..
- 一次失败的加壳经历
- 类基本概念4—友元
- [转]matlab队列实现区域填充
- 我的书单
- Autodesk Vault 二次开发介绍之Job Processor开发
- error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
- asterisk几个通用函数说明
- oracle trunc 函数处理日期格式,日期类型很有用的几个sql
- 从一列数中筛除尽可能少的数使得从左往右看,这些数是从小到大再从大到小的
- Qt creator 中设置命令行参数方法
- The State of Rendering – Part 2
- 【LeetCode】-Reorder List
- 使用zeng studio 创建的php调用webservice soap简单实例
- 安卓_获取入口Activity_根据包名启动其它应用