Error: Failed to synchronize cache for repo ‘AppStream’ for Centos 8

Are you getting this for “dnf upgrade” & are you running Centos 8.0.1905?

No repo urls can be found as the minor version has changed. You can fix this by just referencing the major version (8).


cd /etc/yum.repos.d && sed -i.BAK -e 's/$releasever/8/g' *.repo

and try again. You can probably revert the .BAK files after a full dnf upgrade.