必威体育Betway必威体育官网
当前位置:首页 > IT技术

解决更新yum源的[Errno 14] HTTP Error 404 - Not Found

时间:2019-09-30 23:13:19来源:IT技术作者:seo实验室小编阅读:79次「手机版」
 

error 404--not found

linux输入一些yum命令时出现如下错误:

Loaded plugins: fastestmirror
http://mirrors.163.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP ERROR 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/



 One of the configured repositories failed (CentOS-$releasever - 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/$releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

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

http://mirrors.163.com/centos/

进官网可以看到已经更新到7.x了

进入7可以看到有repodata/repomd.xml

打开CentOS7-Base.repo(名字可能不一样),一般在 ./etc/yum.repos.d文件夹

vim /etc/yum.repos.d/CentOS7-Base.repo

将其中baseurl中的$releasever全改为7,如下图:

保存

输入命令yum makecache 即可。

相关阅读

电影推荐:阿兰·图灵--一个伟大而又悲惨的天才

说起阿兰图灵,大家肯定对他的十分熟悉,他是英国著名的数学家,逻辑学家,被称为计算机科学之父,人工智能之父,提出了著名的”图灵试

谁动了我的奶酪---读后感

《谁动了我的奶酪》这本书黄皮书,封面是动画版的小老鼠和好几块奶酪,很像漫画书,字体粗大,页数也不多,差不多1个多小时就看完了,全书四

基于多目鱼眼相机的全景拼接----------相机标定(一)

相机标定分为内标定与外标定,内标定得到相机相关的内参数,外标定得到相机的外参数R、T,之后还要标定多个相机之间的位置关系,具体见

Appium初级(1)----启动Appium的参数配置介绍

本文来源网络各个资料,适用还不懂Appium的小白人员,使用语言Python 1.Appium启动的参数介绍: deviceName:这个是手机的名字,一般都随

Word2013中解决文字重叠现象

Word用于文字编辑,遇到文字重叠堆在一起的现象,怎么解决呢?本次课程就来告诉大家具体的解决方法。①在Word中,我们看到红字堆叠在一起

分享到:

栏目导航

推荐阅读

热门阅读