Translated message

A translation of this page exists in English.

yum/dnf がメッセージ "Error: Failed to synchronize cache for repo 'xxx'" を表示して終了し、詳細は表示されない

Solution In Progress - Updated -

Issue

  • 以下の例のように、yum または dnf コマンドの実行がエラーで失敗します。

    # dnf repolist
    [...]
    Error: Failed to synchronize cache for repo 'XXX'
  • ログファイル /var/log/dnf.log には Python バックトレースが表示されます。

    Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 566, in load
    ret = self._repo.load()
    File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 503, in load
    return _repo.Repo_load(self)
    RuntimeError: Failed to synchronize cache for repo 'XXX'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
    File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
    File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
    File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1124, in run
    self._process_demands()
    File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 828, in _process_demands
    load_available_repos=self.demands.available_repos)
    File "/usr/lib/python3.6/site-packages/dnf/base.py", line 400, in fill_sack
    self._add_repo_to_sack(r)
    File "/usr/lib/python3.6/site-packages/dnf/base.py", line 135, in _add_repo_to_sack
    repo.load()
    File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 568, in load
    raise dnf.exceptions.RepoError(str(e))
    dnf.exceptions.RepoError: Failed to synchronize cache for repo 'XXX'
    2019-05-24T09:45:02Z CRITICAL Error: Failed to synchronize cache for repo 'XXX'
  • yum/dnf コマンドがエラー Peer certificate cannot be authenticated with given CA certificates で失敗します。

    # yum update
    Updating Subscription Management repositories.
    rhel-8-for-x86_64-appstream-rpms 0.0 B/s | 0 B 00:00
    Errors during downloading metadata for repository 'rhel-8-for-x86_64-appstream-rpms':

    - Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/repodata/repomd.xml [SSL certificate problem: self signed certificate in certificate chain]

    Error: Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Environment

  • Red Hat Enterprise Linux
    • 8
    • 9
  • Red Hat Subscription Manager (RHSM)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content