• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Failed to Download Metadata for Repo ‘repo_name’

by admin

The Problem

All the dnf commands fail with the following error:

# dnf repolist
Oracle Linux 8 BaseOS Latest (x86_64) 0.0 B/s | 0 B 00:00
Failed to download metadata for repo 'ol8_baseos_latest'
Error: Failed to download metadata for repo 'ol8_baseos_latest
dnf was not able to refresh the cache as it could not reach the yum server itself, Hence pointing to cache being expired.
# yum clean metadata
Cache was expired <<<<<<<<<<<<<<
0 files remove

The Solution

This issue is caused by a network problem or incorrect proxy settings.

1. Append the proxy to the file /etc/dnf/dnf.conf.

http://[proxy-host].[domain].com:[port]
# vi /etc/dnf/dnf.conf

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True

http://[proxy-host].[domain].com:[port]

Please substitute the fully qualified domain name, and the port the proxy is using into the proxy setting above.

Filed Under: CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. How to Create and Manage Storage Domains in RedHat Virtualization (RHV)
  2. How to move /tmp on a separate disk as a separate mount point (Online)
  3. How to Boot into Rescue Mode or Emergency Mode Through Systemd in CentOS/RHEL 7 and 8
  4. ip Command Examples to Manage Networking in Linux
  5. Extend the size of /boot partition on virtualized environment (CentOS/RHEL 6)
  6. How to map /dev/sdX and /dev/mapper/mpathY device from the /dev/dm-Z device
  7. “Logical volume vg/lv contains a filesystem in use” – while removing LVM filesystem
  8. “Warning: Missing charsets in String to FontSet conversion” – how to resolve the xclock warning message
  9. Linux Boot Process
  10. dpkg-deb: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright