http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

 One of the configured repositories failed (CentOS-6 - 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. Run the command with the repository temporarily disabled
            yum --disablerepo=base ...

     4. Disable the repository permanently, 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
        or
            subscription-manager repos --disable=base

     5. 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.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
[root@n1 ~]# 
 

查看有无 yum安装包 ,有的话卸载:

查看:rpm -qa |grep yum

卸载:rpm -aq|grep yum|xargs rpm -e –nodeps

变更

rpm -qa|grep yum|xargs rpm -e --nodeps

http://mirrors.163.com/centos/7/os/x86_64/Packages/

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

还有几个自己下载

.下载yum

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
# 复制下载的文件到配置目录下
$ cp CentOS7-Base-163.repo /etc/yum.repos.d/ 
# 切换到配置目录下
$ cd /etc/yum.repos.d/ 
# 重命名
$ mv CentOS-Base.repo CentOS-Base.repo.bak 
# 重命名
$ mv CentOS7-Base-163.repo CentOS-Base.repo

$ yum clean all 

$ yum makecache 

$ yum update

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 您遇到的问题是在使用CentOS镜像源时出现了404错误。这个错误通常是由于镜像源中的某个文件或目录不存在导致的。解决这个问题的方法有几种。一种方法是更换镜像源,可以使用阿里云镜像源来替代原来的镜像源。您可以将相应的CentOS版本的镜像源文件下载到/etc/yum.repos.d目录下,具体命令如下: CentOS 5: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo \[2\] 另一种方法是修改CentOS-Base.repo文件中的$releasever为7,可以使用sed命令来实现,具体命令如下: sed -i 's/$releasever/7/' CentOS-Base.repo 然后清除本地缓存并重新建立缓存,具体命令如下: yum clean all yum makecache \[3\] 通过以上方法,您应该能够解决这个问题并成功下载所需的文件。 #### 引用[.reference_title] - *1* *2* *3* [Redhat7 将本地yum源修改为阿里镜像源,安装软件的时候“HTTP Error 404 - Not Found”的解决办法](https://blog.csdn.net/weixin_43211760/article/details/83929325)[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、付费专栏及课程。

余额充值