我遇到 error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 這樣的問題是在安裝memcached的時(shí)候遇到的。
我按別人的攻略安裝了libevent和memcached之后卻發(fā)現(xiàn)在執(zhí)行的時(shí)候出現(xiàn)了。 error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 這個(gè)錯(cuò)誤提示。
解決類似問題的步驟我相信我的做法可以通用。
1. 首先 find / -name libevent-1.4.so.2 找到缺少的鏈接文件到底在那兒。
2. LD_DEBUG=libs /usr/local/bin/memcached -v
3. 從Debug信息中就知道程序去哪里找鏈接庫了。我這邊程序去 trying file=/usr/lib/libevent-1.4.so.2 而我的鏈接庫的實(shí)際存儲(chǔ)位置是 /usr/local/lib/libevent-1.4.so.2
4. 做一個(gè)軟連接 ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
5. 搞定。
本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/orion_04/archive/2009/07/29/4390666.aspx |
|