报错以下:less
[root@stage memcached-1.4.15]# /usr/local/bin/memcached -d -m 512 -c 512 -p 12000 -u root -l 211.157.137.245 ide
/usr/local/bin/memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directorymemcached
解决:get
首先查看,libevent 在哪里it
[root@stage memcached-1.4.15]# whereis libeventevent
libevent: /usr/lib/libevent.a /usr/lib/libevent.so /usr/lib/libevent.laclass
而后,再看memcached 从×××它tls
[root@stage memcached-1.4.15]# LD_DEBUG=libs memcached -v 2>&1 > /dev/null | lessobject
5493: find library=libhugetlbfs.so [0]; searchingfile
5493: search cache=/etc/ld.so.cache
5493: trying file=/usr/lib64/libhugetlbfs.so
5493:
5493: find library=libevent-2.0.so.5 [0]; searching
5493: search cache=/etc/ld.so.cache
5493: 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)
5493: trying file=/lib64/tls/x86_64/libevent-2.0.so.5
5493: trying file=/lib64/tls/libevent-2.0.so.5
5493: trying file=/lib64/x86_64/libevent-2.0.so.5
5493: trying file=/lib64/libevent-2.0.so.5
5493: trying file=/usr/lib64/tls/x86_64/libevent-2.0.so.5
5493: trying file=/usr/lib64/tls/libevent-2.0.so.5
5493: trying file=/usr/lib64/x86_64/libevent-2.0.so.5
5493: trying file=/usr/lib64/libevent-2.0.so.5
5493:
memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
能够看到:是/usr/lib64/libevent-2.0.so.5,因此,建立软链
[root@stage memcached-1.4.15]# ln -s /usr/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
本机启动:
/usr/local/bin/memcached -d -m 512 -c 512 -p 12000 -u root
关闭memcached :pkill memcached