sudo ln -s /usr/local/lib/libevent-2.0.so.5 /lib64/
真是蛋疼。。。
初用centos,不少不習慣,記錄一下。web
首先裝EPEL,否則默認的包少得可憐:(詳見:http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat)centos
sudo yum install epel-release
裝完以後再用yum會報錯:post
[root@cloud:~]yum search tmuxspa
Loaded plugins: fastestmirror, refresh-packagekit, security.net
Loading mirror speeds from cached hostfilecode
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try againget
解決辦法爲:(詳見:https://community.hpcloud.com/article/centos-63-instance-giving-cannot-retrieve-metalink-repository-epel-error)it
sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo
yum check-update
好了,能夠開始裝別的東西了。。
io
OK,立刻又碰到錯誤,裝tmux唔得,解決以下 :event
一、系統自帶libevent過低,要手動裝2.0的:詳見http://superuser.com/questions/738829/attempting-to-install-tmux-on-centos-6-4-or-centos-6-5-fails-with-error-evbuff
wget http://iweb.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz tar -xvzf libevent-2.0.22-stable.tar.gz cd libevent-2.0.22-stable ./configure make make install
二、連接出錯,要手動改Makefile加參數:詳見:http://superuser.com/questions/829860/undefined-reference-to-b64-ntop-tmux-compilation-error-on-centos
錯誤:
.../tty.c:1067: undefined reference to `__b64_ntop'
解決:打開Makefiler找到【LIBS = -lutil -lcurses -levent -lrt】後面加-lresov
三、運行出錯,要手動對依賴的so作軟鏈:詳見同上
tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
解決:
sudo ln -s /usr/local/lib/libevent-2.0.so.5 /lib64/
真是蛋疼。。。