I am using CentOS 8. I’m trying to install Python 3. Command: sudo dnf install python3
. Error:
Failed to synchronize cache for repo ‘BaseOS’
How can I fix this?
I am using CentOS 8. I’m trying to install Python 3. Command: sudo dnf install python3
. Error:
Failed to synchronize cache for repo ‘BaseOS’
How can I fix this?
2
Answers
Centos did something funny with the value of
$releasever
in that they were using the full version8.0.1905
instead of just8
. When the new version8.1.1911
was released they archived the old version. If you do in install of old media or use an old vagrant box this may cause the following issue:The fix for this is to specify the Centos version on the
dnf
command line using the--releasever
option like this:Change the baseurl from mirror.centos.org to vault.centos.org in the appropriate repo file here:
/etc/yum.repos.d/