yum里面似乎没有
sf上下载,被盾,翻墙下
tmux-1.7.tar.gz
tar -xzf tmux-1.7.tar.gz
cd tmux-1.7
./configure --prefix=/usr/local/tmux
make
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
我遇到 error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 这样的问题是在安装memcached的时候遇到的。
我按别人的攻略安装了libevent和memcached之后却发现在执行的时候出现了。 error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 这个错误提示。
解决类似问题的步骤我相信我的做法可以通用。
1. 首先 find / -name libevent-1.4.so.2 找到缺少的链接文件到底在那儿。
2. LD_DEBUG=libs /usr/local/bin/memcached -v
3. 从Debug信息中就知道程序去哪里找链接库了。我这边程序去 trying file=/usr/lib/libevent-1.4.so.2 而我的链接库的实际存储位置是 /usr/local/lib/libevent-1.4.so.2
4. 做一个软连接 ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib/libevent-1.4.so.2
5. 搞定。