编译tmux1.8

1. 编译依赖

sudo aptitude build-dep tmux

2. 编译libevent

1 wget --no-check-certificate https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
2 tar xzf libevent-2.0.21-stable.tar.gz
3 cd libevent-2.0.21-stable
4 ./configure
5 make
6 sudo make install

3. 编译tmux

1 wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
2 tar zxfv tmux-1.8.tar.gz
3 cd tmux-1.8
4 ./configure
5 make
6 sudo make install

 

错误:

1.编译tmux时,可能出现的错误

control.c: In function ‘control_callback’:
control.c:63: warning: implicit declaration of function ‘evbuffer_readln’
control.c:63: error: ‘EVBUFFER_EOL_LF’ undeclared (first use in this function)
control.c:63: error: (Each undeclared identifier is reported only once
control.c:63: error: for each function it appears in.)
control.c:63: warning: assignment makes pointer from integer without a cast
make: *** [control.o] Error 1

原因是使用的libevent的版本太低造成的,tmux1.8要求libevent>= 2.0.10-stable

2. 运行tmux可能出现的错误

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

解决办法:建立相应的symbol link

32bit系统

ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5

64bit系统

ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

 

 

posted @ 2013-04-20 11:17  *tingliang*  阅读(1758)  评论(0编辑  收藏  举报