gpt4 book ai didi

fedora - 在 Fedora 21 中使用 YUM 和 DNF 时出错

转载 作者:行者123 更新时间:2023-12-05 06:44:39 27 4
gpt4 key购买 nike

我读了this article in fedoramagzine.org并遵循了这个过程。从那时起,我无法从 yum 和 dnf 执行更新、安装等。

这是我从DNF得到的错误

Abhinav@localhost ~$ sudo dnf update
[sudo] password for Abhinav:
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64': Cannot prepare internal mirrorlist: Curl error: Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64 [Connection timed out after 120002 milliseconds]

这是我在使用 YUM 时遇到的错误

Abhinav@localhost ~$ sudo yum update Loaded plugins: langpacks
One of the configured repositories failed (Fedora 21 - x86_64), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:

yum-config-manager --disable fedora

4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=fedora.skip_if_unavailable=true

Cannot retrieve metalink for repository: fedora/21/x86_64. Please verify its path and try again

我什至清空了 /etc/yum.repos.d 中的所有存储库,除了安装发行版时获得的原始 3 个存储库。

更新::
@Etan Reisner 这是 rpm -qa nss\*

的输出
 Abhinav@localhost ~$ rpm -qa nss\*
nss-softokn-freebl-3.17.3-1.fc21.x86_64
nss-util-devel-3.17.3-1.fc21.x86_64 nss-sysinit-3.17.3-2.fc21.x86_64
nss-util-3.17.3-1.fc21.x86_64 nss-tools-3.17.3-2.fc21.x86_64
nss-softokn-freebl-3.17.3-1.fc21.i686 nss-3.17.3-2.fc21.x86_64
nss-softokn-freebl-devel-3.17.3-1.fc21.x86_64
nss-mdns-0.10-15.fc21.x86_64 nss-mdns-0.10-15.fc21.i686
nss-util-3.17.3-1.fc21.i686 nss-softokn-3.17.3-1.fc21.i686
nss-devel-3.17.3-2.fc21.x86_64 nss-softokn-devel-3.17.3-1.fc21.x86_64
nss-3.17.3-2.fc21.i686 nss-softokn-3.17.3-1.fc21.x86_64

更新 2

格式化我的笔记本电脑并重新安装 Fedora 21。在 3 次 sudo dnf 更新 之后。我再次遇到这个问题。这次我没有按照上一篇文章的步骤进行。

在进一步的谷歌搜索中,我找到了 https://fedorahosted.org/fedora-infrastructure/ticket/4517谈论同样的错误。它已关闭,但我无法再次找到合适的解决方案。

最佳答案

如果你坐在代理后面,你必须相应地配置 dnf。 (即使用户的代理设置没问题,你也必须为 dnf 设置它们。)dnf 设置存储在/etc/dnf/dnf.conf 中。语法是:
proxy=<协议(protocol)>:// :<端口>

如果这不是您的问题,请尝试使用浏览器下载元数据,以确保您与 url 的网络连接正常。
要接收的文件应该是一个 xml 文件。如果您无法通过浏览器下载元数据,可能是端口 443(用于 https)被阻止或您的互联网连接出现问题。

关于fedora - 在 Fedora 21 中使用 YUM 和 DNF 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28222165/

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