centos 官网源中没有tmux,无法使用yum install tmux的方式安装。因此自己动手丰衣足食(编译安装)
- 安装开发套件
yum groupinstall "Development Tools"
- 下载安装libevent
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make && make install
- 安装tmux
wget https://github.com/tmux/tmux/releases/download/2.7/tmux-2.7.tar.gz
tar zxvf tmux-2.7.tar.gz
cd tmux-2.7
./configure
make && make install
在执行 ./configure
的时候可能遇到如下问题:
- configure: error: "curses not found" 类似not found这种错误都是缺少相关的依赖包~ 直接安装就好
yum install ncurses-devel
然后:
./confugre
make && make install
安装完成后输入tmux查看是否安装成功,如果出现如下异常:
tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
解决办法是:
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
- 再输入tmux应该就没有问题啦