Steven's Blog

A Dream Land of Peace!

安装tmux时error While Loading Shared Libraries: libevent-2.0.so.5问题的解决

I have kept a blog on tmux installation which is about missing module libevent, and the post is on:

1
http://isunix.github.io/blog/2014/12/24/libevent-not-found-error-while-install-tmux/

Recently even after I install the livevent module, I still get the following errors after installing tmux and then running tmux:

1
 ./tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or

I installed the libevent lib in $HOME/local/lib, and tmux says it can not find the library, Weird. With the help of one of my colleague, this problem is solved.

1
2
3
4
5
export DIR="$HOME/local"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR/lib
./configure --prefix=$DIR CFLAGS="-I$DIR/include" LDFLAGS="-L$DIR/lib"
make
make install

As we can see, the point here is setting the “LD_LIBRARY_PATH” variable.