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

问题描述 投票:1回答:2

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

这是我从DNF得到的错误

Abhinav @ localhost~ $ sudo dnf update Abhinav的[sudo]密码: 错误:无法从'https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64'为repo' fedora'同步缓存:无法准备内部镜像列表:卷曲错误:https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64达到超时[连接超时120002毫秒后]

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

Abhinav @ localhost~ $ sudo yum update加载插件:langpacks 其中一个配置的存储库失败(Fedora 21 - x86_64),并且yum没有足够的缓存数据可以继续。在这一点上,百胜唯一能做的安全就是失败。有几种方法可以“修复”这个:

 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

无法检索存储库的metalink:fedora / 21 / x86_64。请验证其路径,然后重试

我甚至清空了/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 updates。我再次陷入这个问题。这次我没有按照上一篇文章的步骤进行操作。

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

fedora yum dnf
2个回答
0
投票

如果您坐在代理后面,则必须相应地配置dnf。 (即使用户的代理设置正常,也必须将它们设置为dnf。)dnf设置存储在/etc/dnf/dnf.conf中。语法是: proxy = <protocol>:// <ip或name>:<port>

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


0
投票

问题

与kubernete(k83)有类似的错误,同时启动Fedora 23 VM master与vagrant

Error: Failed to synchronize cache for repo 'updates' from 

系统规格

THE

达尔文内核版本15.6.0:2016年11月2日星期三20:30:56 PDT 2016; root:xnu-3248.60.11.1.2~2 / RELEASE_X86_64 x86_64

流浪汉

已安装版本:1.9.2最新版本:1.9.2

Fedora的

Fedora23 x86_64

RCA

  1. 登录fedora23VM后,以详细模式运行yum update sudo yum --verbose update从metalink中提供的每个存储库下载卷曲超时。例如 错误:卷曲错误(56):从对等体接收http://ftp.polytechnic.edu.na/pub/fedora/linux/updates/23/x86_64/repodata/af3c46471b1d685f22c72a5e16d7383d333fb89db278711b2b8c794e29a91eaa-filelists.xml.gz [Recv failure:Connection reset by peer](http://ftp.polytechnic.edu.na/pub/fedora/linux/updates/23/x86_64/repodata/af3c46471b1d685f22c72a5e16d7383d333fb89db278711b2b8c794e29a91eaa-filelists.xml.gz)时失败。

2.没有ssl证书验证的卷曲下载,它工作,即

curl -k -O https://www.ftp.saix.net/linux/distributions/fedora/linux/updates/23/x86_64/repodata/repomd.xml

在yum更新期间禁用ssl证书验证,即

sudo yum --verbose update  --setopt "sslverify=0"  -y
© www.soinside.com 2019 - 2024. All rights reserved.