0%

从源码安装tmux


作者: 耗子007


安装libevent

首先,需要到官网(http://libevent.org/)去下载最新的源码,安装流程如下:

1
2
3
4
5
6
wget --no-check-certificate https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -zxf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure -prefix=/usr
make -j4
make install

安装ncurses

tmux依赖ncurses,因此需要先安装ncurses,同样通过源码安装,脚本如下:

1
2
3
4
5
6
wget http://invisible-island.net/datafiles/release/ncurses.tar.gz
tar -zxf ncurses.tar.gz
cd ncurses-5.9/
./configure
make -j4
make install

安装tmux

1
2
3
4
5
6
7
$ apt-get install automake  #依赖aclocal命令
$ git clone https://github.com/tmux/tmux.git
$ cd tmux
$ sh autogen.sh
$ ./configure -prefix=/usr #注意prefix,不然安装到/usr/local/bin目录,可能执行不了
$ make
$ make install

tmux已经安装,成功了!!!