码迷,mamicode.com
首页 > 系统相关 > 详细

memcached: error while loading shared libraries: libevent-2.0.so.5: cannot o解决

时间:2015-08-11 13:46:07      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:

1.检查memcached是否正常运行

#ps aux | grep memcached

#或者

#telnet localhost 11211

会显示memcached的基本信息

如果启动时出现“memcached: error while loading shared libraries:libevent-2.0.so.5: cannot open shared object file: No such file or directory”之类的信息,表示memcached 找不到 libevent 的位置
2、查看libevent 在哪里
# whereis libevent

#提示

libevent-2.0.so.5: /usr/local/lib/libevent-2.0.so.5

3、再看memcached 从哪里找它

> ldd /usr/local/bin/memcached   (ldd指令不熟悉的去查看下)

#提示

libevent-2.0.so.5 => not found    (没有找到该文件)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)

libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)

librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)

/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

 

> LD_DEBUG=libs ./memcached -v

#找到默认路径 /usr/lib/

>sudo ln -s /usr/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

>sudo ldd /usr/local/bin/memcached

#提示

libevent-2.0.so.5 => /usr/lib64/libevent-2.0.so.5 (0x00002b83fcbcd000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)

libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)

librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)

/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

 

 

memcached: error while loading shared libraries: libevent-2.0.so.5: cannot o解决

标签:

原文地址:http://www.cnblogs.com/isum/p/4720580.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!