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?

Sabapathy
  • 257
  • 1
  • 4
  • 7
  • 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 05 '14 at 07: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 05 '14 at 07:45
  • Just in case, add you `ifconfig` and `route` output. – ludiegu Feb 06 '14 at 10:37

1 Answers1

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?

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Raja David
  • 376
  • 3
  • 5