Das Problem
Alle dnf-Befehle schlagen mit folgendem Fehler fehl:
# 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
Die Lösung
Dieses Problem wird durch ein Netzwerkproblem oder falsche Proxy-Einstellungen verursacht.
1. Hängen Sie den Proxy an die Datei /etc/dnf/dnf.conf an .
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]
Bitte ersetzen Sie den vollständig qualifizierten Domänennamen und den Port, den der Proxy verwendet, in der obigen Proxy-Einstellung.