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 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
  • 56,709
  • 26
  • 150
  • 232