【运行报错】CentOS 7.5 yum 源报错:repomd.xml: [Errno 14] HTTP Error 404 - Not Found

1. 报错信息:

yum 源可能会报错

[root@controller ~]# yum makecache
Loaded plugins: fastestmirror
base                                                                     | 5.6 kB  00:00:00     
failure: repodata/repomd.xml from centos-ceph-luminous: [Errno 256] No more mirrors to try.
http://mirror.centos.org/altarch/7/storage/x86_64/ceph-luminous/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.


One of the configured repositories failed (CentOS-7 - Base - 163.com),
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 base

    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=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file

2. 原因分析:

是因为yum已经更新了的原因导致的

3. 解决方法:

看清楚:failure后边的文件名,在对其进行更改

failure: repodata/repomd.xml from centos-ceph-luminous: [Errno 256] No more mirrors to try.
http://mirror.centos.org/altarch/7/storage/x86_64/ceph-luminous/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

  1. 进入yum源 目录

    [root@controller lib]# cd /etc/yum.repos.d
    [root@controller yum.repos.d]# ls
    CentOS-Base.repo      CentOS-Ceph-Luminous.repo  CentOS-Debuginfo.repo  CentOS-Media.repo             CentOS-QEMU-EV.repo  CentOS-Storage-common.repo  CentOS-x86_64-kernel.repo  epel-testing.repo
    CentOS-Base-repo.bak  CentOS-CR.repo             CentOS-fasttrack.repo  CentOS-OpenStack-queens.repo  CentOS-Sources.repo  CentOS-Vault.repo           epel.repo
    
  2. 修改CentOS-Base.repo:

    # 将 所有[子文件]中的 baseurl 中的 $releasever 替换成 7
    [base]
    name=CentOS-$releasever - Base - mirrors.aliyun.com
    failovermethod=priority
    baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
            http://mirrors.aliyuncs.com/centos/7/os/$basearch/
            http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
    
  3. 修改CentOS-Ceph-Luminous.repo:

    # 将 所有[子文件]中的 baseurl 设置为:
    baseurl = http://mirrors.aliyun.com/centos/7/storage/x86_64/ceph-luminous/
    
  4. 修改CentOS-OpenStack-queens.repo:

    # 将 所有[子文件]中的 baseurl 设置为:
    baseurl =http://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-queens/
    
  5. 清空 yum 缓存

    yum clean all
    
  6. 重新生成缓存

    yum makecache
    
  7. 更新 yum 源软件包和内核

    yum upgrade –y
    
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 根据引用\[1\]和引用\[2\]的内容,你遇到的问题是在尝试从阿里云镜像下载软件包时出现了404错误。这个错误表示请求的URL未找到。根据引用\[3\]的描述,你可能遇到了DNS解析问题,导致无法解析mirrors.aliyuncs.com这个地址。你可以尝试手动修改DNS配置,添加114的DNS地址,并且不重启网卡,然后再尝试下载软件包。另外,你也可以考虑换一个可用的镜像来解决这个问题。 #### 引用[.reference_title] - *1* [centos 7 yum安装失败(出现repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found)的解决方法](https://blog.csdn.net/qq_27088383/article/details/108729324)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [http://mirrors.aliyun.com/epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 -](https://blog.csdn.net/weixin_52895466/article/details/113561244)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http:/](https://blog.csdn.net/publicstaticfinal/article/details/120745622)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值