./event-test: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
原因是找不到libevent-1.4.so.2类库,解决办法如下:
$:LD_DEBUG=libs ./memcached -v 2>&1 > /dev/null | less
2262: search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib (system search path)
2262: trying file=/lib/tls/i686/sse2/libevent-1.4.so.2
2262: trying file=/lib/tls/i686/libevent-1.4.so.2
2262: trying file=/lib/tls/sse2/libevent-1.4.so.2
2262: trying file=/lib/tls/libevent-1.4.so.2
2262: trying file=/lib/i686/sse2/libevent-1.4.so.2
2262: trying file=/lib/i686/libevent-1.4.so.2
2262: trying file=/lib/sse2/libevent-1.4.so.2
2262: trying file=/lib/libevent-1.4.so.2
2262: trying file=/usr/lib/tls/i686/sse2/libevent-1.4.so.2
2262: trying file=/usr/lib/tls/i686/libevent-1.4.so.2
2262: trying file=/usr/lib/tls/sse2/libevent-1.4.so.2
2262: trying file=/usr/lib/tls/libevent-1.4.so.2
2262: trying file=/usr/lib/i686/sse2/libevent-1.4.so.2
2262: trying file=/usr/lib/i686/libevent-1.4.so.2
2262: trying file=/usr/lib/sse2/libevent-1.4.so.2
2262: trying file=/usr/lib/libevent-1.4.so.2
2262:
./event-test: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
例子程序会到很多地方去找,所以根据其它求,我们只需建一个软链接,指定到我们安装的类库上即可
方法如下:
ln -s /usr/local/lib/libevent-1.4.so.2 /lib/libevent-1.4.so.2
OK
阅读(3215) | 评论(1) | 转发(0) |