CentOS 7.6 - yum update error “Cannot find a valid baseurl for repos: addons/7”












1














When I am trying to do yum update, I got the following error message.



Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch= error was
14: curl#7 - "Failed to connect to 2001:4178:5:200::10: Network is unreachable

Cannot find a valid baseurl for repo: addons/7


How can I fix it?










share|improve this question
























  • Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
    – Haxiel
    Dec 20 '18 at 6:25










  • I tried curl http://mirrorlist.centos.org and I got a empty response.
    – AdamKong
    Dec 20 '18 at 6:51










  • But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
    – AdamKong
    Dec 20 '18 at 7:04










  • A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
    – Haxiel
    Dec 20 '18 at 7:46










  • Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
    – AdamKong
    Dec 21 '18 at 7:24
















1














When I am trying to do yum update, I got the following error message.



Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch= error was
14: curl#7 - "Failed to connect to 2001:4178:5:200::10: Network is unreachable

Cannot find a valid baseurl for repo: addons/7


How can I fix it?










share|improve this question
























  • Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
    – Haxiel
    Dec 20 '18 at 6:25










  • I tried curl http://mirrorlist.centos.org and I got a empty response.
    – AdamKong
    Dec 20 '18 at 6:51










  • But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
    – AdamKong
    Dec 20 '18 at 7:04










  • A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
    – Haxiel
    Dec 20 '18 at 7:46










  • Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
    – AdamKong
    Dec 21 '18 at 7:24














1












1








1







When I am trying to do yum update, I got the following error message.



Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch= error was
14: curl#7 - "Failed to connect to 2001:4178:5:200::10: Network is unreachable

Cannot find a valid baseurl for repo: addons/7


How can I fix it?










share|improve this question















When I am trying to do yum update, I got the following error message.



Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch= error was
14: curl#7 - "Failed to connect to 2001:4178:5:200::10: Network is unreachable

Cannot find a valid baseurl for repo: addons/7


How can I fix it?







centos yum






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 3:37

























asked Dec 20 '18 at 3:29









AdamKong

62




62












  • Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
    – Haxiel
    Dec 20 '18 at 6:25










  • I tried curl http://mirrorlist.centos.org and I got a empty response.
    – AdamKong
    Dec 20 '18 at 6:51










  • But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
    – AdamKong
    Dec 20 '18 at 7:04










  • A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
    – Haxiel
    Dec 20 '18 at 7:46










  • Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
    – AdamKong
    Dec 21 '18 at 7:24


















  • Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
    – Haxiel
    Dec 20 '18 at 6:25










  • I tried curl http://mirrorlist.centos.org and I got a empty response.
    – AdamKong
    Dec 20 '18 at 6:51










  • But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
    – AdamKong
    Dec 20 '18 at 7:04










  • A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
    – Haxiel
    Dec 20 '18 at 7:46










  • Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
    – AdamKong
    Dec 21 '18 at 7:24
















Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
– Haxiel
Dec 20 '18 at 6:25




Can you do curl http://mirrorlist.centos.org and see if you get a valid HTML response? If not, you'll need to the check the internet connectivity on this system.
– Haxiel
Dec 20 '18 at 6:25












I tried curl http://mirrorlist.centos.org and I got a empty response.
– AdamKong
Dec 20 '18 at 6:51




I tried curl http://mirrorlist.centos.org and I got a empty response.
– AdamKong
Dec 20 '18 at 6:51












But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
– AdamKong
Dec 20 '18 at 7:04




But I could get a valid response when I do ping mirrorlist.centos.org. What internet connectivity problem would it be?
– AdamKong
Dec 20 '18 at 7:04












A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
– Haxiel
Dec 20 '18 at 7:46




A firewall might be interfering with your connection. Please check this: serverfault.com/a/177407
– Haxiel
Dec 20 '18 at 7:46












Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
– AdamKong
Dec 21 '18 at 7:24




Thank you very much!!! Somehow my firewall is blocking port 80 outbound, meanwhile allows port 443 outbound. So it is solved by changing the firewall setting.
– AdamKong
Dec 21 '18 at 7:24










1 Answer
1






active

oldest

votes


















0














For those who had similar problem, I had solved the problem by the following steps.




  1. Go to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and change ONBOOT=yes


  2. Add http to firewall by firewall-cmd --permanent --zone=public --add-service=http


  3. Restart the firewall firewall-cmd --reload


  4. Restart the network service network restart



And then the problems go away.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490059%2fcentos-7-6-yum-update-error-cannot-find-a-valid-baseurl-for-repos-addons-7%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    For those who had similar problem, I had solved the problem by the following steps.




    1. Go to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and change ONBOOT=yes


    2. Add http to firewall by firewall-cmd --permanent --zone=public --add-service=http


    3. Restart the firewall firewall-cmd --reload


    4. Restart the network service network restart



    And then the problems go away.






    share|improve this answer


























      0














      For those who had similar problem, I had solved the problem by the following steps.




      1. Go to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and change ONBOOT=yes


      2. Add http to firewall by firewall-cmd --permanent --zone=public --add-service=http


      3. Restart the firewall firewall-cmd --reload


      4. Restart the network service network restart



      And then the problems go away.






      share|improve this answer
























        0












        0








        0






        For those who had similar problem, I had solved the problem by the following steps.




        1. Go to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and change ONBOOT=yes


        2. Add http to firewall by firewall-cmd --permanent --zone=public --add-service=http


        3. Restart the firewall firewall-cmd --reload


        4. Restart the network service network restart



        And then the problems go away.






        share|improve this answer












        For those who had similar problem, I had solved the problem by the following steps.




        1. Go to /etc/sysconfig/network-scripts/ifcfg-enp0s3 and change ONBOOT=yes


        2. Add http to firewall by firewall-cmd --permanent --zone=public --add-service=http


        3. Restart the firewall firewall-cmd --reload


        4. Restart the network service network restart



        And then the problems go away.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 27 '18 at 10:30









        AdamKong

        62




        62






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490059%2fcentos-7-6-yum-update-error-cannot-find-a-valid-baseurl-for-repos-addons-7%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre