Home > Tags > yum

yum

yumでエラー「Metadata file does not match checksum」

yum update で以下のようなエラーが出て直らない。

[Errno -1] Metadata file does not match checksum
Trying other mirror.

以下サイトで解決。設定ファイルを下の内容で丸々置き換えることで直りました。それ以上の原因追及はしたほうがいいけれどしていません。
→どなたか原因がわかった人がいればおしえてください。

レポジトリ - なんでも Do it yourself

[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

CentOS5でyumを使えるようにするには

1.プロキシを設定

# vi /etc/yum.conf

# 以下を yum.conf に追加
proxy=http://xxx:ポート番号

yum には必要ないが以下もやっておくといい

export http_proxy=http://xxx:ポート番号
vi ~/.subversion/servers

2.「GPG key retrieval failed: [Errno 4] IOError: <urlopen error」のようなエラーがでるようなら以下を試す

[centosplus] の enabled を 1 に変える

# vi /etc/yum.repos.d/CentOS-Base.repo

あとはキーを設定する

wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
rpm --import RPM-GPG-KEY-CentOS-5

参考
http://r-sos.blogspot.com/2007/04/cent-os-50_25.html

[24時間365日] サーバ/インフラを支える技術 ‾スケーラビリティ、ハイパフォーマンス、省力運用 (WEB+DB PRESS plusシリーズ)
安井 真伸 横川 和哉 ひろせ まさあき 伊藤 直也 田中 慎司 勝見 祐己
技術評論社
売り上げランキング: 704
おすすめ度の平均: 4.5

5 インフラ構築する前に必読です。
5 Webサービスを支えるインフラの最前線がわかる本
4 正直、ちょっと難しい。。。
4 細かいtipsは役に立つが…HAの基本は先に知っている必要がある
5 おもしろい!

CentOS徹底入門 第2版 (DVD付)
飛田 伸一郎 中島 能和
翔泳社
売り上げランキング: 40774
おすすめ度の平均: 5.0

5 (初級の中〜中級の下の方にとっては)良書です

ホーム > タグ > yum

ぴくちゃー
ブログパーツ

ページの上部に戻る