centos-6.4 yum EPEL

初用centos,很多不习惯,记录一下。

首先装EPEL,不然默认的包少得可怜:(详见:http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat)

sudo yum install epel-release

 装完之后再用yum会报错:

[root@cloud:~]yum search tmux

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

解决办法为:(详见:https://community.hpcloud.com/article/centos-63-instance-giving-cannot-retrieve-metalink-repository-epel-error)

sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo
yum check-update

好了,可以开始装别的东西了。。

OK,马上又碰到错误,装tmux唔得,解决如下 :

1、系统自带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

2、链接出错,要手动改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

3、运行出错,要手动对依赖的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/

真是蛋疼。。。

 

原文地址:https://www.cnblogs.com/wellbye/p/4708826.html