摘自 http://superuser.com/questions/324613/installing-a-library-locally-in-home-directory-but-program-doesnt-recognize-it

~ # ldd ./a.out
   linux-gate.so.1 =>  (0xffffe000)
   libevent-2.0.so.5 => not found
   libc.so.6 => /lib/libc.so.6 (0xb75d0000)
   /lib/ld-linux.so.2 (0xb7731000)
~ # export LD_LIBRARY_PATH=/usr/local/lib/:${LD_LIBRARY_PATH}
~ # ldd ./a.out
   linux-gate.so.1 =>  (0xffffe000)
   libevent-2.0.so.5 => /usr/local/lib/libevent-2.0.so.5 (0xb7873000)
   libc.so.6 => /lib/libc.so.6 (0xb7713000)
   librt.so.1 => /lib/librt.so.1 (0xb770a000)
   /lib/ld-linux.so.2 (0xb78aa000)
   libpthread.so.0 => /lib/libpthread.so.0 (0xb76f1000)


Reference:

Try re-building libevent using

./configure --disable-shared

I suspect this will fix your problem because the library will be linked against when building the binary and doesn't need to be searched for at runtime.

Alternatively, if you have a need for a dynamically linked libevent, you can add the containing directory of libevent-2.0.so.5 to your LD_LIBRARY_PATH environment variable:

export LD_LIBRARY_PATH=${HOME}/local/lib/:${LD_LIBRARY_PATH}