{"id":130,"date":"2022-03-24T14:17:55","date_gmt":"2022-03-24T06:17:55","guid":{"rendered":"http:\/\/blog.ohmmx.com\/?p=130"},"modified":"2022-03-24T14:17:55","modified_gmt":"2022-03-24T06:17:55","slug":"%e5%bd%93centos-8%e7%b3%bb%e7%bb%9f%e4%b8%8d%e8%83%bd%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"http:\/\/blog.ohmmx.com\/?p=130","title":{"rendered":"\u5f53CentOS 8\u7cfb\u7edf\u4e0d\u80fd\u66f4\u65b0"},"content":{"rendered":"\n<p>\u672c\u6587\u8f6c\u8f7d\u81ea\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/70963985\/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/stackoverflow.com\/questions\/70963985\/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal<\/a><\/p>\n\n\n\n<p>\u4eca\u5929\u95f2\u6765\u65e0\u4e8b\uff0c\u60f3\u628a\u81ea\u5df1\u7684\u670d\u52a1\u5668\u5347\u7ea7\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf -y update<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u51fa\u9519\u4e86\uff01\uff01\uff01<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Repository epel is listed more than once in the configuration\r\nCentOS Linux 8 - AppStream\r\nError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist<\/code><\/pre>\n\n\n\n<p>\u627e\u4e86\u4e00\u7bc7\u76f8\u540c\u95ee\u9898\u7684\u5e16\u5b50\uff0c\u5f00\u59cb\u4e00\u987f\u64cd\u4f5c<\/p>\n\n\n\n<p>\u5148\u662f\u5bfc\u51658.3\u7684gpg key\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget 'http:\/\/mirror.centos.org\/centos\/8-stream\/BaseOS\/x86_64\/os\/Packages\/centos-gpg-keys-8-3.el8.noarch.rpm'\r\nsudo rpm -i 'centos-gpg-keys-8-3.el8.noarch.rpm'<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5207\u6362repo\u6e90\u7531centos-linux-repos\u8c03\u6574\u4e3acentos-stream-repos\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos<\/code><\/pre>\n\n\n\n<p>\u6700\u540e\u66f4\u65b0\u6240\u6709\u8f6f\u4ef6\u5230\u6700\u65b0\u7684\u7a33\u5b9a\u53d1\u884c\u7248\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf distro-sync<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8f6c\u8f7d\u81ea\uff1a https:\/\/stackoverflow.com\/questio &hellip; <a href=\"http:\/\/blog.ohmmx.com\/?p=130\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[29,7],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-21","tag-linux","tag-7"],"_links":{"self":[{"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":1,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":132,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions\/132"}],"wp:attachment":[{"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ohmmx.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}