centos 安装软件后出现:

./usr/local/bin/memcached

libevent-2.0.so.5: cannot open shared object file: No such file or directory

解决libevent-2.0.so.5: cannot open shared object file: No such file or directory解决方法  

1.

用以下命令LD_DEBUG=libs /usr/local/bin/memcached -v  查看寻找的路径是哪里

[root@114 bin]# LD_DEBUG=libs /usr/local/memcached/bin/memcached -v

      6465:     find library=libevent-1.4.so.2 [0]; searching

      6465:      search cache=/etc/ld.so.cache

      6465:      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)

      6465:       trying file=/lib64/tls/x86_64/libevent-1.4.so.2

      6465:       trying file=/lib64/tls/libevent-1.4.so.2

      6465:       trying file=/lib64/x86_64/libevent-1.4.so.2

      6465:       trying file=/lib64/libevent-1.4.so.2

      6465:       trying file=/usr/lib64/tls/x86_64/libevent-1.4.so.2

      6465:       trying file=/usr/lib64/tls/libevent-1.4.so.2

      6465:       trying file=/usr/lib64/x86_64/libevent-1.4.so.2

      6465:       trying file=/usr/lib64/libevent-1.4.so.2

      6465:

/usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

[root@114bin]#

2.

寻找的路径为上图所示,

find / -name libevent-2.0.so.5 

[root@AY131114130908718f32Z local]# find / -name libevent-2.0.so.5

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

/data/libevent-1.2/.libs/libevent-2.0.so.5

找到libevent-2.0.so.5 路径

3.

ln -s /usr/lib64/tls/libevent-1.4.so.2 /usr/local/lib/libevent-2.0.so.5

4.

 bin]# ./memcached -u root -d

 bin]#

OK,问题解决

 

 

http://blog.51cto.com/sdongyu/1554758