`

启动memcache时遇到 error while loading shared libraries: libevent-1.4.so.2: cannot o

阅读更多

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

我在启动memcache时遇到  error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 这样的问题是在安装memcached的时候遇到的。

我按别人的攻略安装了libevent和memcached之后却发现在执行的时候出现了。 error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 这个错误提示。

解决类似问题的步骤我相信我的做法可以通用。

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 而我的链接库的实际存储位置是 /usr/local/lib/libevent-1.4.so.2

4. 做一个软连接 ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2

5. 搞定。

 

这种情况特别是在软件是32位,而系统是64位的情况下出现,查了一下,软件把文件放到usr/lib下,而系统查找路径是usr/lib64下。

 

转自:

http://blog.csdn.net/orion_04/archive/2009/07/29/4390666.aspx

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics