memcached安装报错 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory解决

我是从其他服务器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了

 

posted @ 2018-05-22 10:28  Jay·Chan  阅读(498)  评论(0编辑  收藏  举报