error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil

Posted 风华正茂

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil相关的知识,希望对你有一定的参考价值。

我是从其他服务器scp来的memcached(~~~整个文件夹的那种,windows用多了的后遗症)

在准备运行 ./memcached -d -u root -l localhost -m 800 -p 11211 

启动memcached的时候, boom~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

一开始我是忘记装libevent依赖了

于是乎去官网wget了libevent-2.0.22-stable这个版本的libevent

chmod 755 configure
#授权 大家都懂的
./configure --prefix=/usr/local/libevent
#环境检查巴拉巴拉一堆~~~
make && make install
#编译安装

然后接着用之前的命令运行memcached 还是报了之前的错误

于是重新去官网下载memcached,按照网上找到得安装方法操作

还是报之前得错误~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

败下阵来以后,打开了仿佛在嘲笑我的部署文档

发现我libevent安装得没有问题,将memcached删除殆尽~~~

去官网wget到了memcached-1.4.24这个版本

解压完以后执行了以下命令~~~~一定要细心

chmod 755 configure

./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/
# --with-libevent=/usr/local/libevent/ 我之前就是漏了这个 一定要加上去
make && make install

然后到 /usr/local/memcached/bin/ 这个目录下执行   ./memcached -d -u root -l localhost -m 800 -p 11211

就ojbk了

 

以上是关于error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such fil的主要内容,如果未能解决你的问题,请参考以下文章

error while loading shared libraries错误解决

error while loading shared libraries错误解决

error while loading shared libraries: libmcrypt.so.4

error while loading shared libraries: libaio.so.1

linux下报错:error while loading shared libraries

error while loading shared libraries的解決方法