Le problème
Toutes les commandes dnf échouent avec l'erreur suivante :
# 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 solution
Ce problème est dû à un problème de réseau ou à des paramètres de proxy incorrects.
1. Ajoutez le proxy au fichier /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]
Veuillez remplacer le nom de domaine complet et le port utilisé par le proxy dans le paramètre de proxy ci-dessus.