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

时间:2015-01-29 18:42:03

标签: fedora yum dnf

我阅读this article in fedoramagzine.org并按照流程进行操作。从那时起,我无法从yum和dnf执行更新,安装等。

这是我从DNF获得的错误

  

Abhinav @ localhost~ $ sudo dnf update
  Abhinav的[sudo]密码:
  错误:无法为repo' fedora'同步缓存   'https://mirrors.fedoraproject.org/metalink?repo=fedora-21&arch=x86_64':   无法准备内部镜像列表:卷曲错误:已达到超时   对于   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会谈到相同的错误。它已关闭,但我再也找不到合适的解决方案了。

2 个答案:

答案 0 :(得分:0)

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

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

答案 1 :(得分:0)

<强>问题

在使用vagrant启动Fedora 23 VM master时与kubernete(k83)有类似的错误

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

系统规格

OS

  

达尔文内核版本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. 2.在没有ssl证书验证的情况下进行卷曲下载并且工作正常 即

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

    <强>解决方案

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

    sudo yum --verbose update  --setopt "sslverify=0"  -y