<分区>
我正在使用 Fedora 25。我正在尝试使用 sudo dnf install gcc
命令在 fedora25 上安装 gcc。它总是显示:
Error: Failed to synchronize cache for repo 'updates'
当我尝试安装其他包时,我也遇到了同样的错误。我做错了什么?
<分区>
我正在使用 Fedora 25。我正在尝试使用 sudo dnf install gcc
命令在 fedora25 上安装 gcc。它总是显示:
Error: Failed to synchronize cache for repo 'updates'
当我尝试安装其他包时,我也遇到了同样的错误。我做错了什么?
最佳答案
我也遇到了这个问题。添加详细标志显示 $releasever
未在 url 中设置。使用 dnf update -v
在输出中查找这些行:
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'
我用 dnf clean all && dnf update --releasever=25
解决了这个问题。
这会用您提供的代码覆盖 $releasever
。之后,我能够再次更新和安装 rpms。
关于linux - 错误 : Failed to synchronize cache for repo 'updates' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45318256/