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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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 snapshot of LVM thin volumes using snapper command
  2. CentOS / RHEL 7 : Beginners guide to systemd targets (replacement of SysV init run levels)
  3. How to verify the integrity of a file with md5 checksum
  4. How to Setup VNC Server for New User in CentOS/RHEL 5
  5. How the BASH Shell load its configuration files in Linux
  6. How to Create a GFS2 Formatted Cluster File System
  7. Cron Script does not Execute as Expected from crontab – Troubleshoot
  8. CentOS / RHEL : How to disable BASH shell history
  9. NFSv4 Client Shows “nobody” As Owner And Group For Mount Point (CentOS/RHEL)
  10. Understanding SELinux Booleans

You May Also Like

Primary Sidebar

Recent Posts

  • Failed to start LSB: Bring up/down networking – On restarting network service CentOS/RHEL (DHCP client)
  • How To Add Timestamps To dmesg Kernel Boot Log in CentOS/RHEL
  • How to disable ICMP redirects on CentOS/RHEL
  • What are Oracle Key Vault Roles
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary