gpt4 book ai didi

CentOS 8 - yum/dnf 错误 : Failed to download metadata for repo

转载 作者:行者123 更新时间:2023-12-04 19:30:08 28 4
gpt4 key购买 nike

关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。












我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。


2年前关闭。







Improve this question




在我的 CentOS 8 服务器上,许多 dnfyum命令失败并出现此错误:

Failed to download metadata for repo



这似乎仅适用于涉及 https 连接的存储库,例如:
/etc/yum.repos.d $ cat epel-modular.repo
[epel-modular]
name=Extra Packages for Enterprise Linux Modular $releasever - $basearch/pub/epel/$releasever/Modular/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir
...

我用过 wget测试到这些站点的连接性并且它是成功的,例如 wget https://mirrors.fedoraproject.org成功。

然而,各种 dnfyum命令失败:
$ dnf provides /bin/ls
Extra Packages for Enterprise Linux Modular 8 - x86_64 0.0 B/s | 0 B 00:00
Failed to download metadata for repo 'epel-modular'
Error: Failed to download metadata for repo 'epel-modular'

# dnf update --refresh
CentOS-8 - AppStream 20 kB/s | 4.3 kB 00:00
CentOS-8 - Base 19 kB/s | 3.8 kB 00:00
CentOS-8 - Extras 7.4 kB/s | 1.5 kB 00:00
CentOS-8 - PowerTools 20 kB/s | 4.3 kB 00:00
Remi's Modular repository for Enterprise Linux 8 - x86_64 4.1 kB/s | 3.5 kB 00:00
Safe Remi's RPM repository for Enterprise Linux 8 - x86_64 3.6 kB/s | 3.0 kB 00:00
Wazuh repository 0.0 B/s | 0 B 00:00
Failed to download metadata for repo 'wazuh_repo'
Error: Failed to download metadata for repo 'wazuh_repo'

我该如何解决这个问题?

最佳答案

就我而言

sudo rm -r /var/cache/dnf 

解决了我的问题。

来源: https://access.redhat.com/discussions/4222851

关于CentOS 8 - yum/dnf 错误 : Failed to download metadata for repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59993633/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com