{"id":9307,"date":"2022-04-27T17:47:00","date_gmt":"2022-04-27T15:47:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=9307"},"modified":"2022-04-27T09:57:09","modified_gmt":"2022-04-27T07:57:09","slug":"progressively-un-centoing","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2022\/04\/27\/progressively-un-centoing\/","title":{"rendered":"Progressively un-centoing"},"content":{"rendered":"\n<p>I got slightly annoyed when <a href=\"https:\/\/en.wikipedia.org\/wiki\/CentOS\">Centos were terminated.<\/a> In my efforts to Fedorize the server I use everyday to host the WordPress blog that records most of the work done on our Quality Managament System I encountered this annoying error<\/p>\n\n\n\n<p><a href=\"https:\/\/namespaceit.com\/blog\/failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal-mirrorlist-no-urls-in-mirrorlist\">Failed to download metadata for repo &#8216;appstream&#8217;: Cannot prepare internal mirrorlist: No URLs in mirrorlist &#8211; Centos 8<\/a><\/p>\n\n\n\n<p>luckily Habibur Rhoman Joy from <a href=\"https:\/\/namespaceit.com\/blog\/failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal-mirrorlist-no-urls-in-mirrorlist\">namespaceit.com provided an easy solution on his blog<\/a>.<\/p>\n\n\n\n<!--more-->\n\n\n<blockquote>\n<div class=\"category__date\"><span class=\"formated__date\">Habibur Rhoman Joy<\/span><\/div>\n<div class=\"text-center\">\n<pre id=\"block-6c853149-10e4-444b-926c-ae74268c8fe1\" class=\"block-editor-block-list__block wp-block is-selected wp-block-code\" tabindex=\"0\" role=\"document\" aria-label=\"Block: Code\" data-block=\"6c853149-10e4-444b-926c-ae74268c8fe1\" data-type=\"core\/code\" data-title=\"Code\"><code class=\"\" data-line=\"\">FROM centos:8&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;RUN sed -i &#039;s\/mirrorlist\/#mirrorlist\/g&#039; \/etc\/yum.repos.d\/CentOS-Linux-* &amp;&amp;\\&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;    sed -i &#039;s|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g&#039; \/etc\/yum.repos.d\/CentOS-Linux-*&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;#docker&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;RUN yum upgrade -y&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;#other commands&lt;br data-rich-text-line-break=&quot;true&quot; \/&gt;<\/code><\/pre>\n<\/div>\n<p>\u00a0<\/p>\n<p>On Centos 8, I have run &#8220;sudo yum update&#8221; but getting this error &#8211;\u00a0<\/p>\n<pre>Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist<\/pre>\n<p>Here I have given different solution for different situation.<\/p>\n<p><b>Solution 1:<\/b><\/p>\n<p>This error we are getting cause\u00a0CentOS 8 became EOL at the end of 2021. Better if you migrate to\u00a0CentOS Stream 8,\u00a0CentOS 9 or\u00a0<a href=\"https:\/\/rockylinux.org\/\" rel=\"nofollow noreferrer\">Rocky Linux<\/a><span style=\"color: #232629; font-family: -apple-system, system-ui, Segoe UI, Liberation Sans, sans-serif;\">.<\/span><\/p>\n<p>To solve current os you can run these commands &#8211;<\/p>\n<pre><code class=\"\" data-line=\"\">sed -i &#039;s\/mirrorlist\/#mirrorlist\/g&#039; \/etc\/yum.repos.d\/CentOS-Linux-*\n\nsed -i &#039;s|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g&#039; \/etc\/yum.repos.d\/CentOS-Linux-*\n<\/code><\/pre>\n<p>If you run these commands then\u00a0dnf will work, but you will not get any updates.<\/p>\n<p>If you want you can also upgrade to centos 8 stream:<\/p>\n<pre><code class=\"\" data-line=\"\"> sudo dnf install centos-release-stream -y\n sudo dnf swap centos-{linux,stream}-repos -y\n sudo dnf distro-sync -y<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><b>Solution 2:<\/b><\/p>\n<p>If you are using docker, you may face same type of problem. Hope this commands will help you &#8211;<\/p>\n<pre><code class=\"\" data-line=\"\">FROM centos:8\n\nRUN sed -i &#039;s\/mirrorlist\/#mirrorlist\/g&#039; \/etc\/yum.repos.d\/CentOS-Linux-* &amp;&amp;\\\n    sed -i &#039;s|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g&#039; \/etc\/yum.repos.d\/CentOS-Linux-*\n\n#docker\nRUN yum upgrade -y\n\n#other commands\n<\/code><\/pre>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">I got slightly annoyed when Centos were terminated. In my efforts to Fedorize the server I use everyday to host the WordPress blog that records most of the work done on our Quality Managament System I encountered this annoying error Failed to download metadata for repo &#8216;appstream&#8217;: Cannot prepare internal mirrorlist: No URLs in mirrorlist&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2022\/04\/27\/progressively-un-centoing\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[111],"tags":[318],"class_list":["post-9307","post","type-post","status-publish","format-standard","hentry","category-fedora-redhat","tag-centos"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2q7","jetpack-related-posts":[{"id":1925,"url":"https:\/\/monodes.com\/predaelli\/2016\/11\/17\/texlive-is-crippled-in-centos-7\/","url_meta":{"origin":9307,"position":0},"title":"TexLive is crippled in Centos 7","author":"Paolo Redaelli","date":"2016-11-17","format":"link","excerpt":"Oh, what a joy discovering that TexLive packages in CentOS 7 are bugged or crippled beyond any reasonable amount! Furthermore TeXlive in distros like CentOS 7 is crippled since they don't offer the TeXlive Manager called tlmgr. So updating packages is a pain, since it has to be done manually,\u2026","rel":"","context":"In &quot;Tex&quot;","block_context":{"text":"Tex","link":"https:\/\/monodes.com\/predaelli\/category\/tex\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3603,"url":"https:\/\/monodes.com\/predaelli\/2017\/12\/28\/vim-8-for-centos-linux-7\/","url_meta":{"origin":9307,"position":1},"title":"Vim 8 for CentOS Linux 7","author":"Paolo Redaelli","date":"2017-12-28","format":"link","excerpt":"Vim 8 for CentOS Linux 7 \u2013 Karanbir Singh :: Thinkability @karan.org Basically add repo https:\/\/copr.fedorainfracloud.org\/coprs\/mcepl\/vim8\/repo\/epel-7\/mcepl-vim8-epel-7.repo","rel":"","context":"In &quot;vim&quot;","block_context":{"text":"vim","link":"https:\/\/monodes.com\/predaelli\/category\/vim\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75,"url":"https:\/\/monodes.com\/predaelli\/2014\/10\/17\/inversione-del-campo-magnetico-da-polo-nord-a-polo-sud-in-cento-anni\/","url_meta":{"origin":9307,"position":2},"title":"Inversione del campo magnetico: da polo nord a polo sud in cento anni","author":"Paolo Redaelli","date":"2014-10-17","format":false,"excerpt":"","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2014\/10\/86898565_563dab2319_z.jpg?fit=640%2C584&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2014\/10\/86898565_563dab2319_z.jpg?fit=640%2C584&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2014\/10\/86898565_563dab2319_z.jpg?fit=640%2C584&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3388,"url":"https:\/\/monodes.com\/predaelli\/2017\/09\/27\/epiphany-on-centos-7\/","url_meta":{"origin":9307,"position":3},"title":"Epiphany on CentOS 7","author":"Paolo Redaelli","date":"2017-09-27","format":false,"excerpt":"I'm quite puzzeled: Centos 7 contains the same software as RedHat so knowing that Red Hat is one of the forces behind Gnome one would expect to find Web, the browser once known as Epiphany to be installed or at least installable on it. Nope. As I discoverede reading Gnome\u2026","rel":"","context":"In &quot;Fedora - RedHat&quot;","block_context":{"text":"Fedora - RedHat","link":"https:\/\/monodes.com\/predaelli\/category\/fedora-redhat\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1648,"url":"https:\/\/monodes.com\/predaelli\/2016\/06\/07\/debianisms\/","url_meta":{"origin":9307,"position":4},"title":"Debianisms","author":"Paolo Redaelli","date":"2016-06-07","format":false,"excerpt":"I was going to enable mod_rewrite on the new work box, discovering that CentOS doesn't have a2enmod. So reading apache 2.2 - CentOS\u201c-bash: a2enmod: command not found\u201d - from Server Fault I discovered that a2enmod is a debianism, on CentOS you will need to do this manually. Please refer to\u2026","rel":"","context":"In &quot;Fedora - RedHat&quot;","block_context":{"text":"Fedora - RedHat","link":"https:\/\/monodes.com\/predaelli\/category\/fedora-redhat\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1814,"url":"https:\/\/monodes.com\/predaelli\/2016\/10\/21\/sometimes-it-is-annoying\/","url_meta":{"origin":9307,"position":5},"title":"Sometimes it is annoying","author":"Paolo Redaelli","date":"2016-10-21","format":false,"excerpt":"Who? SELinux of course! Mind me, it is a wonderful tool. Tell me I'm old-fashioned, tell me I'm unacknowledged about the security it brings. This after I just wanted to add a theme to my Wordpress inner company blog. SELinux kept saying something like \"I don't think so!\". I ended\u2026","rel":"","context":"In &quot;Fedora - RedHat&quot;","block_context":{"text":"Fedora - RedHat","link":"https:\/\/monodes.com\/predaelli\/category\/fedora-redhat\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=9307"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9307\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=9307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=9307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=9307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}