El problema
Todos los comandos dnf fallan con el siguiente 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
La solución
Este problema lo causa un problema de red o ajustes de proxy incorrectos.
1. Añada el proxy al archivo /etc/dnf/dnf.conf.
https://[proxy-host].[domain].com:[port]
# vi /etc/dnf/dnf.conf [main] gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=True best=True https://[proxy-host].[domain].com:[port]
Sustituya el nombre de dominio completo y el puerto del proxy en el ajuste anterior.