Tmux源码编译安装

来源:互联网 发布:淘宝封号支付宝花呗 编辑:程序博客网 时间:2024/05/04 08:54

Tmux源码编译安装

一 安装libevent

1下载libevent-2.0.20-stable.tar.gz,解压

[root@localhost soft]# tar xvf libevent-2.0.20-stable.tar.gz

[root@localhost libevent-2.0.20-stable]#./configure --prefix=/home/install/libevent2.0.20

[root@localhost libevent-2.0.20-stable]#make

[root@localhost libevent-2.0.20-stable]#make install

 

二 安装tmux

[root@localhost tmux-1.9a]#export LIBEVENT_LIBS=/home/install/libevent2.0.20/lib/

[root@localhost tmux-1.9a]#export CFLAGS=-I/home/install/libevent2.0.20/include

[root@localhost tmux-1.9a]#export LDFLAGS="-L /home/install/libevent2.0.20/lib"

[root@localhost tmux-1.9a]#./configure --prefix=/home/install/tmux1.9a

注:如果没有LDFLAGS会提示:configure: error: "libevent not found"

接下来编译:

[root@localhost tmux-1.9a]#make install

 

三 运行tmux

[root@localhost bin]# ./tmux

提示:./tmux: errorwhile loading shared libraries: libevent-2.0.so.5: cannot open shared objectfile: No such file or directory

[root@localhost bin]# cp /home/install/libevent2.0.20/lib/libevent-2.0.so.5/usr/lib/

[root@localhost bin]# ./tmux

 

完毕!

0 0
原创粉丝点击