0

I'm using centOS 6.4.

I'm getting this error when I use "yum update" in the terminal window.

 Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

Is there any alternative mirror for Upgrading?

  • 1
    Can you ping mirrorlist.centos.org? If not you have DNS problem.. Try to add 8.8.8.8 DNS server. – Sepahrad Salour Feb 5 '14 at 7:38
  • or the less spying openDNS adress to your DNS: 208.67.222.222 , 208.67.220.220. what happen if you ping of this what is the content of the file resolv.conf ? – Kiwy Feb 5 '14 at 7:45
  • Just in case, add you ifconfig and route output. – ludiegu Feb 6 '14 at 10:37
1

I had been struggling with the same problem on Centos6.4 x86_64. I got the following error :

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'" Error: Cannot find a valid baseurl for repo: base

So, I fixed it by these steps:

edit network interface. For my case, I used eth0.

vim /etc/sysconfig/network-scripts/ifcfg-eth0

update NM_CONTROLLED to no

ONBOOT=no
NM_CONTROLLED=no
BOOTPROTO=dhcp
DNS1=8.8.8.8
DNS2=4.2.2.2

restart the network interface

ifdown eth0
ifup eth0

I posted the same answer at : How can I fix "cannot find a valid baseurl for repo" errors on CentOS?

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.