Translated message

A translation of this page exists in English.

如何解决 "systemd[1]: dnf-makecache.service:Failed with result 'exit-code'." 问题

Solution In Progress - Updated -

Issue

  • /var/log/messages 日志显示以下错误信息:
[warning] systemd[1]: dnf-makecache.service: Failed with result 'exit-code'.
[err] systemd[1]: Failed to start dnf makecache.
  • yum 命令或 /var/log/dnf.log 显示以下错误:"Curl error (37):Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml [Couldn't open file /mnt/BaseOS/repodata/repomd.xml]"

Environment

  • Red Hat Enterprise Linux 8 及更新版本
  • systemd
  • dnf-makecache.service

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