2014/05/18

Amazon LinuxのデフォルトのEPELを利用しようとしてエラーが出るときは…

Amazon のよくある質問にも書いてあるのですが、

Q: Extra Packages for Enterprise Linux(EPEL)リポジトリを有効にするにはどうすればよいですか?

これに従って yum --enablerepo=epel install hogehoge とかやると、

One of the configured repositories failed (不明),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:

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

なんて言われてEPELが利用出来ないときは、/etc/yum.repos.d/epel.repo を
修正してあげるとすんなり直ります。

# vi /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

↑ もともとコメントアウトされている baseurl のコメントを外して、
 代わりに mirrorlist をコメントアウトする。

0 件のコメント:

コメントを投稿