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?

  • 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
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.

-1

edit file etc/resolv.config

nameserver (DNS)

example: nameserver 192.168.0.1

  • I'm not sure how to point to ( presumably pre-existing!?! ) DNS server on a local network would fix their IPv6 issue? – Jeff Schaller Feb 24 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.