{"id":2089,"date":"2024-08-12T12:36:25","date_gmt":"2024-08-12T04:36:25","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=2089"},"modified":"2024-08-12T12:36:25","modified_gmt":"2024-08-12T04:36:25","slug":"centos-7-could-not-resolve-host-mirrorlist-centos-org","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=2089","title":{"rendered":"CentOS 7 Could not resolve host: mirrorlist.centos.org"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h_01HAMMP99X1B2YNVPWA2CGJX4S\">Issue<\/h2>\n\n\n\n<p>CentOS 7 ELS install failed<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Error: `Could not retrieve mirrorlist <a href=\"http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=os&amp;infra=genclo\">http:\/\/mirrorlist.centos.org\/?release=7&amp;arch=x86_64&amp;repo=os&amp;infra=genclo<\/a> error was<br><br>curl#6 - \"Could not resolve host: mirrorlist.centos.org; Unknown error\"`<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h_01HAMMP99XXD26NTX49SV85WB5\">Environment<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CentOS 7<\/li>\n\n\n\n<li>CentOS 7 ELS<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h_01HAMMP99XZ6BXNEK5JHQ5RG2B\">Solution<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i.bak 's\/mirrorlist\/#mirrorlist\/g' \/etc\/yum.repos.d\/CentOS-*<br>sed -i.bak 's|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g' \/etc\/yum.repos.d\/CentOS-* <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h_01HAMMP99X5YRZ1CFMW7ZERF83\">Cause<\/h2>\n\n\n\n<p>CentOS 7 has reached its end-of-life&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Issue CentOS 7 ELS install failed Error: `Could not ret &#8230; <a title=\"CentOS 7 Could not resolve host: mirrorlist.centos.org\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=2089\" aria-label=\"\u9605\u8bfb CentOS 7 Could not resolve host: mirrorlist.centos.org\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2089","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2089"}],"version-history":[{"count":1,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2089\/revisions"}],"predecessor-version":[{"id":2090,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2089\/revisions\/2090"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}