{"id":291,"date":"2015-03-11T14:39:13","date_gmt":"2015-03-11T06:39:13","guid":{"rendered":"http:\/\/heliang.net.cn\/?p=291"},"modified":"2015-03-11T14:39:13","modified_gmt":"2015-03-11T06:39:13","slug":"%e5%9c%a8centos-7%e4%b8%ad%e4%bd%bf%e7%94%a8yum%e6%8a%a5%e9%94%99-repodatarepomd-xml-errno-14-http-error-404-not-found","status":"publish","type":"post","link":"https:\/\/www.heliang.net.cn\/?p=291","title":{"rendered":"\u5728CentOS 7\u4e2d\u4f7f\u7528yum\u62a5\u9519  repodata\/repomd.xml: [Errno 14] HTTP Error 404 &#8211; Not Found"},"content":{"rendered":"<p>\u5f00\u59cb\u66f4\u6539\u5b8c\/etc\/yum.repos.d\/CentOS-Base-repo\uff0c\u8fd0\u884cyum\u62a5\u9519\uff0c\u8f93\u51fa\u5982\u4e0b\uff1a\n<\/p>\n<blockquote>\n<p>[root@centos7 ~]# yum search all [K[K[K[Kini[Kt[Kitiatot[Kr\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>Loaded plugins: fastestmirror, langpacks\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>http:\/\/mirror.sohu.com\/centos\/7\/os\/x86_64\/repodata\/repomd.xml: [Errno 14] HTTP Error 404 &#8211; Not Found\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>Trying other mirror.\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p> One of the configured repositories failed (CentOS-7 &#8211; Base),\n<\/p>\n<\/blockquote>\n<blockquote>\n<p> and yum doesn&#8217;t have enough cached data to continue. At this point the only\n<\/p>\n<\/blockquote>\n<blockquote>\n<p> safe thing yum can do is fail. There are a few ways to work &#8220;fix&#8221; this:\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>     1. Contact the upstream for the repository and get them to fix the problem.\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>     2. Reconfigure the baseurl\/etc. for the repository, to point to a working\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        upstream. This is most often useful if you are using a newer\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        distribution release than is supported by the repository (and the\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        packages for the previous distribution release still work).\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>     3. Disable the repository, so yum won&#8217;t use it by default. Yum will then\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        just ignore the repository until you permanently enable it again or use\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        &#8211;enablerepo for temporary usage:\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>            yum-config-manager &#8211;disable base\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>     4. Configure the failing repository to be skipped, if it is unavailable.\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        Note that yum will try to contact the repo. when it runs most commands,\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        so will have to try and fail each time (and thus. yum will be be much\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        slower). If it is a very temporary problem though, this is often a nice\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>        compromise:\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>            yum-config-manager &#8211;save &#8211;setopt=base.skip_if_unavailable=true\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>\n\u00a0<\/p>\n<\/blockquote>\n<blockquote>\n<p>failure: repodata\/repomd.xml from base: [Errno 256] No more mirrors to try.\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>http:\/\/mirror.sohu.com\/centos\/7\/os\/x86_64\/repodata\/repomd.xml: [Errno 14] HTTP Error 404 &#8211; Not Found\n<\/p>\n<\/blockquote>\n<blockquote>\n<p>]0;root@centos7:~\n<\/p>\n<\/blockquote>\n<p>\u901a\u8fc7\u67e5\u627e\u53d1\u73b0\uff0c\u662f\u4ed3\u5e93\u5730\u5740\u914d\u7f6e\u9519\u8bef\u4e86\u3002\n<\/p>\n<p>\u5c06\u6240\u6709\u4ed3\u5e93http:\/\/mirror.sohu.com\/&#8230;\u66f4\u6b63\u4e3ahttp:\/\/mirror<span style=\"color:red; background-color:lime\">s<\/span>.sohu.com\/&#8230;.\u5373\u53ef\u6b63\u5e38\u641c\u7d22\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u59cb\u66f4\u6539\u5b8c\/etc\/yum.repos.d\/CentOS-Base-repo\uff0c\u8fd0\u884cyum\u62a5\u9519\uff0c\u8f93\u51fa\u5982\u4e0b\uff1a [r [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/291"}],"collection":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291"}],"version-history":[{"count":1,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/291\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heliang.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}