如果在公司的环境,没有root权限,需要安装 tmux 在你自己的home下:
(cd to your home)
/remote/home1/AAA
(wget libevent and tmux, and then uncompress them)
Tar -xvzf libevent-2.0.20-stable.tar.gz
tar -xvzf tmux-1.7.tar.gz
cd libevent-2.0.20-stable
./congiure --prefix=/remote/home1/AAA/tmux-1.7_Install
make
make install
cd ../tmux-1.7
setenv PKG_CONFIG_PATH /remote/home1/AAA/libevent-2.0.20-stable
./configure --prefix=/remote/home1/AAA/tmux-1.7_Install
make
make install
在产生makefile后,需要手动在makefile修改一个问题: 删除include路径中的 -I-, 因为 libevent lib path 已经被包含了.
am__append_7 = -I. -I- -I/usr/local/include
有root权限的安装非常简单,例如CentOS安装Tmux
oops 出错
control.c: In function ‘control_callback’:
control.c:103: warning: implicit declaration of function ‘evbuffer_readln’
control.c:103: error: ‘EVBUFFER_EOL_LF’ undeclared (first use in this function)
control.c:103: error: (Each undeclared identifier is reported only once
control.c:103: error: for each function it appears in.)
make: *** [control.o] Error 1
google 老半天说需要libevent2
libevent-2.0.20-stable.tar.gz
tar -xzf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable
./configure --prefix=/tmp/libevent
make
make install
# ok ,继续编译tmux
CFLAGS="-I/tmp/libevent/include" LDFLAGS="-L/tmp/libevent/lib" ./configure --prefix=/usr/local/tmux
make
sudo make install
#ok 也没有问题
/usr/local/tmux/bin/tmux
#报错 tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
sudo cp /tmp/libevent/lib/libevent-2.0.so.5 /usr/lib
#在执行就可以
/usr/local/tmux/bin/tmux
如果提示 ncurses not found 就执行 yum -y install ncurses-devel 就OK
#.bashrc中加入tmux的path 就可以使用了
即 在.baserc 文件中加入 PATH=/usr/local/tmux/bin:$PATH