I am using Fedora 25. I'm trying to install gcc on fedora25 using the sudo dnf install gcc
command. It is always showing:
Error: Failed to synchronize cache for repo 'updates'
I am also getting the same error when I try to install other packages. What am I doing wrong?
I just ran into this as well. Adding the verbose flag showed the $releasever
wasn't set in the url. Check this yourself with dnf update -v
Look for these lines in the output:
Cannot download 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink.
Error: Failed to synchronize cache for repo 'fedora'
I fixed the issue with dnf clean all && dnf update --releasever=25
.
This overrides the $releasever
with the one you supply. After that, I was able to update and install rpms again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With