centos-6.4 yum EPEL

初用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/

真是蛋疼。。。

相关文章
相关标签/搜索