LoginSignup
7

More than 5 years have passed since last update.

posted at

古いversionのRed hatのyumupdateを有効にする方法

yum updateできなくなった古いRedhatでyumコマンドを復活させる方法

yum updateを実行した所下記のエラーが発生

yum update
Loaded plugins: security
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. 5Server is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/local/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: local. Please verify its path and try again

サポートが終了した古いバージョンはミラーから取り除かれてしまうため、yum updateを実行しても
エラーが発生してしまう模様。

下記にて古いリポジトリを参照できるとのこと。
http://vault.centos.org/4.9/

なので/etc/yum.repos.d/以下のファイルを次のように変更すればok。

local.repo
name=RHEL $releasever - local repo`
#baseurl=http://10.235.26.47/rhel-x86_64-server-5/getPackage`
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://vault.centos.org/5.7/os/$basearch/
enabled=1
gpgcheck=0 

これで、
yum updateで更新出来ました。

参考:http://d.hatena.ne.jp/tmatsuu/20120324/1332578375

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
7