【问题标题】:Centos sudo yum update failsCentos sudo yum 更新失败
【发布时间】:2016-09-05 16:31:46
【问题描述】:

我在尝试更新 yum 以确保安全时出现以下错误,有人可以建议修复吗?我已经运行 yum clean 元数据,但没有工作我担心运行 yum clean all,因为这在另一篇文章中被建议作为修复我不确定它是做什么的?

    sudo yum update
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                         | 2.1 kB     00:00     
amzn-updates/latest                                      | 2.3 kB     00:00     
centos                                                   | 3.7 kB     00:00     
http://apt.sw.be/redhat/el5/en/x86_64/dag/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel/x86_64/metalink                                     |  23 kB     00:00     
epel/x86_64                                              | 4.3 kB     00:00     
epel/x86_64/updateinfo                                   | 736 kB     00:00     
epel/x86_64/primary_db                                   | 5.9 MB     00:00     
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
rpmforge                                                 | 1.9 kB     00:00     
4028 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package aws-cli.noarch 0:1.10.46-1.40.amzn1 will be updated
---> Package aws-cli.noarch 0:1.10.56-1.41.amzn1 will be an update
---> Package compat-libtiff3.x86_64 0:3.9.4-10.13.amzn1 will be updated
---> Package compat-libtiff3.x86_64 0:3.9.4-18.14.amzn1 will be an update
---> Package curl.x86_64 0:7.40.0-8.58.amzn1 will be updated
---> Package curl.x86_64 0:7.40.0-8.59.amzn1 will be an update
---> Package dracut.noarch 0:004-336.28.amzn1 will be updated
---> Package dracut.noarch 0:004-409.31.amzn1 will be an update
http://apt.sw.be/redhat/el5/en/x86_64/dag/repodata/filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

谢谢

【问题讨论】:

  • 你能分享“ls /etc/yum.repos.d/”的输出吗?您的存储库之一无效,其中包括 apt.sw.be url。您应该禁用该 repo 或删除 repo 文件。
  • 嗨@AliOkanYüksel 感谢我使用AWS EC2 输出的回复。 amzn-main.repo centos.repo 镜像-rpmforge amzn-nosrc.repo dag.repo 镜像-rpmforge-extras amzn-preview.repo epel.repo 镜像-rpmforge-testing amzn-updates.repo epel-testing.repo rpmforge.repo

标签: sqlite centos sudo yum


【解决方案1】:

您应该删除 /etc/yum.repos.d/ 目录中的无效 repo 文件。

首先检测 repo 文件:

# grep -l apt.sw.be /etc/yum.repos.d/

删除无效的 repo 文件并清理 yum 缓存:

# sudo yum clean all

【讨论】:

  • 很抱歉过于偏执感谢您的回答,但 sudo yum clean 会影响我的设置吗?
  • 不,它不会影响您的设置
【解决方案2】:

虽然 AliOkan 提供了一个有效的答案,但这就是它首先失败的原因,因为我也遇到了类似的问题。

从你的跟踪来看(你实际上有一个对 el5 的引用,顺便说一句,它不再维护):

http://apt.sw.be/redhat/el[5|6]/en/x86_64/dag/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

此错误表明 RPMForge 存储库存在一些问题,然后在 official repo 上有以下信息:

RPMforge/RepoForge 状态

RPMForge/RepoForge 是一个死项目。它不被维护。 不要 使用

另见https://github.com/repoforge/rpms/issues/375

它不再官方维护,但如果需要,有镜像,请参阅上面的 git 问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-21
    • 2014-03-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-01
    • 2018-04-21
    • 2019-04-11
    • 2021-10-24
    相关资源
    最近更新 更多