1。编译安装libevent
tar -zxvf
libevent-2.0.19-stable.tar.gz
cd
libevent-2.0.19-stable/
./configure
make && make install
此时会生成libevent.pc在本地目录。拷贝到pkgconfig目录下。
cp ./
libevent.pc /usr/share/pkgconfig/.
无此操作,编译tmux会报错
2.编译安装tmux
tar -zxvf tmux-1.6.tar.gz
cd tmux-1.6
./configure
make && make install
yum install ncurses-devel
解决
4。执行tmux,
有如下报错
[root@ss]# tmux
tmux: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
解决方法:
执行 LD_DEBUG=libs /usr/local/bin/tmux
看到
trying file=/usr/lib/libevent-1.4.so.2
做软连接
ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
解决