linux - 错误 : Failed to synchronize cache for repo 'updates'

标签 linux updates fedora-25 dnf

<分区>

我正在使用 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/

相关文章:

linux - docker exec 的标准输出记录在 docker 容器内的文件中

linux - 可以在解析列之前在 awk 中搜索/替换吗?

linux - Ubuntu 18 更新失败

android - 某些设备上的 UI 未更新

linux - 无法启动 NFS 在 fedora25 中,由于单元 proc-fs-nfsd.mount 被屏蔽而出现错误

linux - 禁止使用 curl/wget 远程下载网页

ruby - 在 ruby​​ 中运行 linux 命令

android - 创建带有更新的新闻应用程序 android

linux - 如何使用 systemd 将应用程序作为守护进程运行?