centos 编译安装tmux

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. 搞定。


 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值