error:while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such fil

Posted xiaobiaomei

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error:while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such fil相关的知识,希望对你有一定的参考价值。

执行 memcached 启动命令时,报错,提示:error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory

查看 memcached 命令缺失什么库
ldd /usr/local/bin/memcached
查看 libevent-1.2.so.1 是否存在
locate libevent-1.2.so.1
结果: 系统已经安装了该模块,在路径 /usr/local/lib/
查看 memcached 查找依赖库的路径
LD_DEBUG=libs /usr/local/memcached/bin/memcached -v
结果: 在 /lib64/ 目录中查找,所以找不到已经安装好的
映射 libevent-1.2.so.1 到 /lib64 路径中
ln -s /usr/local/lib/libevent-1.2.so.1 /usr/lib64/libevent-1.2.so.1
结果:这样处理后,memcached就可以搜索到该文件了
启动memcached
/usr/local/bin/memcached -d -c 10240 -m 1024 -u root

 







以上是关于error:while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such fil的主要内容,如果未能解决你的问题,请参考以下文章

error while loading shared libraries错误解决

error while loading shared libraries错误解决

error while loading shared libraries: libmcrypt.so.4

error while loading shared libraries: libaio.so.1

linux下报错:error while loading shared libraries

error while loading shared libraries的解決方法