memached啓動報錯

報錯以下: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

相關文章
相關標籤/搜索