Chinaunix首页 | 论坛 | 博客
  • 博客访问: 159667
  • 博文数量: 34
  • 博客积分: 2070
  • 博客等级: 大尉
  • 技术积分: 277
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-26 19:29
文章分类
文章存档

2015年(2)

2014年(4)

2013年(1)

2012年(1)

2011年(5)

2010年(21)

我的朋友

分类: 系统运维

2014-05-30 08:52:05

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
阅读(2811) | 评论(0) | 转发(0) |
0

上一篇:vimgdb编译

下一篇:配置lnmp环境

给主人留下些什么吧!~~