memcached安装


转自:http://www.oliyo.com/article/15.htm.

3.安装libevent
   tar zxvf libevent-xxx.tar.gz
   cd  libevent-xxx   ./configure
   make
   make install

我下载的1.4.9-stable版本,需要先make clean和make distclean后才能正常安装,否则报错:
make[2]: *** [event.lo] Error 1
make[2]: Leaving directory `/home/gd/Develope/libevent-1.4.9-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gd/Develope/libevent-1.4.9-stable'
make: *** [all] Error 2

4.安装memcached
   tar zxvf memcached-xxx.tar.gz   cd  memcached-xxx
   ./configure  --prefix=/usr/local/memcached --with-libevent=/usr/local
   make
   make install
问题出现了:当/usr/local/memcached/bin/memcached -d -p 6000 -u root -m 20的时候,出现以下错误:
error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
呀,明明安装了libevent,咋还提示找不到呢?
LD_DEBUG=libs /usr/local/memcached/bin/memcached -v
才看见,原来是一直在trying file=/usr/lib/i486-linux-gnu/libevent-1.4.so.2
我靠,那个麻烦啊
赶紧ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/i486-linux-gnu/libevent-1.4.so.2
然后再次启动memcached,看到那结果,连上帝都哭了,-----------------------------成功

你可能感兴趣的:(linux,memcached)