Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

yum が [Errno 256] No more mirrors to try エラーを返す

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5 以降
  • Red Hat Network (RHN)
  • サブスクリプション管理 (RHSM)

Issue

  • yum update に失敗し、[Errno 256] No more mirrors to try エラーが発生します。
  • yum update に失敗し、以下のようなエラーが発生します。
Error Downloading Packages:
InstallMedia:[Errno 256] No more mirrors to try.
  • yum に失敗し、以下のようなエラーが発生します。
Error Downloading Packages:
ftp-0.17-35.el5.x86_64:failure:ftp-0.17-35.el5.x86_64.rpm from Red5repo55:[Errno 256] No more mirrors to try.[[6]]" (code -1) Packages Scheduled
  • yum に失敗し、以下のようなエラーが発生します。
Downloading Packages:
https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/supplementary/os/Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm:[Errno 14] PYCURL ERROR 22 - "The requested URL returned error:404 Not Found"
Trying other mirror.
Error Downloading Packages:
  1:java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64: failure:Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm from rhel-6-server-supplementary-rpms:[Errno 256] No more mirrors to try.

Resolution

  • 以下のコマンドを実行して /etc/yum.repos.d ディレクトリにファイルが存在することを確認します。
# ll /etc/yum.repos.d
  • システムを RHN Classic に登録している場合は、rhel-source.repo だけが /etc/yum.repos.d/ にあります。
    システムを subscription-manager (RHSM) に登録している場合は rhel-source.reporedhat.repo があります。
    ローカルリポジトリまたはその他のメディアリポジトリが表示されている場合は、以下のコマンドを実行して削除します。
# rm -rf /etc/yum.repos.d/<local or other repository name>
  • 以下のコマンドを実行して、システムから古い yum cache を削除します。
# rm -fr /var/cache/yum/*
# yum clean all
  • 以下のコマンドを実行して有効なリポジトリの一覧を表示できるかどうかを確認します。
# yum repolist

Root Cause

  • 以下の理由によりこの問題が存在します。
    1. yum キャッシュが破損した。
    2. システムからリポジトリの URL にアクセスできない。
    3. カスタマイズしたリポジトリまたはその他のメディアリポジトリが存在する。

Diagnostic Steps

  • システムまたはネットワークでリポジトリの URL にアクセスできることを確認します。
# ping URL
  • /etc/yum.repos.d のリポジトリを確認します。
ll /etc/yum.repos.d
  • 影響を受けるシステムの sosreport を取得します。
  • Component
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments