我不知道如何描述我的问题,因为我不明白为什么会发生......当我进入
sudo dnf install (any packet)
它还给我这个
Tor Project Repo 407 B/s | 264 B 00:00
Error: Failed to download metadata for repo 'Tor': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
很明显 Tor 与那个烂摊子有关,但我不知道为什么。
我什么都没试过,因为我害怕做错事。我在 Fedora 30 上。 (英式长棍面包)
您的存储库似乎已损坏。您可能会在以下位置找到此存储库:
ls /etc/yum.repos.d/
可能会有一个名为
tor*.repo
的文件。如果您删除该文件(或编辑它以包含enabled=0
),那么 dnf 应该再次开始正常工作。
Failed to download metadata for repo ‘bintray–resin-io-redhat’: Cannot download repomd.xml: Cannot download repodata/repomd.xml
我在 kubernetes.repo 上遇到了同样的错误。它通过在
enabled=0
中设置/etc/yum.repos.d/kubernetes.repo
来解决。现在我可以下载其他包(例如我无法下载的 Nginx)。
我试过这个命令并解决了我的问题:
sudo rm -r /var/cache/dnf
执行以下命令。
mv /etc/yum.repos.d/fedora-updates.repo /tmp/
mv /etc/yum.repos.d/fedora-updates-modular.repo /tmp/
yum clean all
yum update
这对我有用-
cd /etc/yum.repos.d
rm -rf .
百胜升级
百胜更新
注意:redhat.repo 将在下一次 yum 运行时自行重新生成,在此过程中一些存储库会丢失,请小心。