memcached をinstallする。

今ちまたで噂のmemcachedを入れてみる。

#cd /home/tmp
#wget http://www.monkey.org/~provos/libevent-1.4.4-stable.tar.gz
#tar xzfv libevent-1.4.4-stable.tar.gz
#cd libevent-1.4.4-stable
./#configure --prefix=/usr/local
#make
#make install

#cd ../
#wget http://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz
#tar xzfv memcached-1.2.5.tar.gz
#cd memcached-1.2.5
./#configure --enable-thread --prefix=/usr/local --with-libevent=/usr/local
#make
#make install

#memcached -p 11211 -m 64 -d -u hachi

以下のエラーが発生した。
 memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

デバッグ

# LD_DEBUG=libs memcached -v
     19615:     find library=libevent-1.4.so.2 [0]; searching
     19615:      search cache=/etc/ld.so.cache
     19615:      search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib                (system search path)
     19615:       trying file=/lib/tls/i686/sse2/libevent-1.4.so.2
     19615:       trying file=/lib/tls/i686/libevent-1.4.so.2
     19615:       trying file=/lib/tls/sse2/libevent-1.4.so.2
     19615:       trying file=/lib/tls/libevent-1.4.so.2
     19615:       trying file=/lib/i686/sse2/libevent-1.4.so.2
     19615:       trying file=/lib/i686/libevent-1.4.so.2
     19615:       trying file=/lib/sse2/libevent-1.4.so.2
     19615:       trying file=/lib/libevent-1.4.so.2
     19615:       trying file=/usr/lib/tls/i686/sse2/libevent-1.4.so.2
     19615:       trying file=/usr/lib/tls/i686/libevent-1.4.so.2
     19615:       trying file=/usr/lib/tls/sse2/libevent-1.4.so.2
     19615:       trying file=/usr/lib/tls/libevent-1.4.so.2
     19615:       trying file=/usr/lib/i686/sse2/libevent-1.4.so.2
     19615:       trying file=/usr/lib/i686/libevent-1.4.so.2
     19615:       trying file=/usr/lib/sse2/libevent-1.4.so.2
     19615:       trying file=/usr/lib/libevent-1.4.so.2
     19615:
memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory


シンボリックリンクを張る。
# ln -s /usr/local/lib/libevent-1.4.so.2 libevent-1.4.so.2
#memcached -p 11211 -m 64 -d -u hachi