如果启动时出现“memcached: error while loading shared libraries:libevent-2.0.so.5: cannot
open shared object file: No such file or directory”之类的信息,表示memcached 找不到
libevent 的位置
所以,请先使用whereis libevent 得到位置,然后连接到memcached 所寻找的路径
首先查看,libevent 在哪里
# whereis libevent
libevent: /usr/local/lib/libevent.la /usr/local/lib/libevent.so /usr/local/lib/libevent.a
然后,再看memcached 从哪里找它
# LD_DEBUG=libs memcached -v 2>&1 > /dev/null | less
可以看到:是/usr/lib/libevent-2.0.so.5,所以,创建软链
[root@localhost tools]# ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5
再次启动