机器环境
[vagrant@localhost lib64]$ cat /etc/redhat-release
CentOS release 6.4 (Final)
[vagrant@localhost lib64]$ uname -a
Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
启动memcache报错
[vagrant@localhost lib64]$ /usr/local/memcached/bin/memcached -d -m 50 -p 11211 -u root -l 0.0.0.0
/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
查看memcache需要的关联库
[vagrant@localhost lib64]$ ldd /usr/local/memcached/bin/memcached
linux-vdso.so.1 => (0x00007fff50bff000)
libevent-2.0.so.5 => not found
librt.so.1 => /lib64/librt.so.1 (0x00007f70cc128000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f70cbf0b000)
libc.so.6 => /lib64/libc.so.6 (0x00007f70cbb78000)
/lib64/ld-linux-x86-64.so.2 (0x00007f70cc337000)
解决方案
[vagrant@localhost lib64]$ sudo cp /usr/lib/libevent-2.0.so.5 /usr/lib64/
error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil
原文:http://blog.csdn.net/angel22xu/article/details/44571445