1. 程式人生 > >error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory解決

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

make scp AR object normal memcache window 2.0 HA

我是從其他服務器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 file or directory解決