CentOS7でyum updateエラー
発生している HTTP Error 404 - Not Found の原因は、CentOS 7 が 2024年6月30日をもってサポート終了(EOL)となり、公式のミラーサーバーからパッケージデータが削除されたためです。現在、OSがパッケージを探しに行っているURL(riken.jpやiij.ad.jpなどのミラーサイト)にはすでにファイルが存在しないため、エラーとなっています。
* updates: ftp.iij.ad.jp
http://ftp.riken.jp/Linux/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
他のミラーを試します。
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
http://mirrors.cat.net/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
他のミラーを試します。
http://download.nus.edu.sg/mirror/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
他のミラーを試します。
この問題を解決し、引き続き yum コマンドを使用できるようにするには、参照先を過去のアーカイブが保存されている Vaultリポジトリ(vault.centos.org) に変更する必要があります。以下の手順でリポジトリの設定ファイルを書き換えることで対応可能です。
- リポジトリ設定ファイルの書き換え
既存の mirrorlist を無効化し、baseurl の参照先を Vault サーバーに向けます。
sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*- yum キャッシュのクリアと再構築
古いミラーのキャッシュを削除し、新しい Vault サーバーの情報を読み込ませます。
yum clean all
yum makecache