Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I finished installing CentOS 6, but when I tried running yum update I got:

[root@centos6test ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os
error was 14: PYCURL ERROR 6 - "" Error: Cannot find a valid baseurl for repo: base

Why is that happening? How can I fix it?

share|improve this question
1  
Are you connected to the network? Can you ping mirrorlist.centos.org? – Nikhil Mulley Dec 4 '11 at 8:51
1  
What happens if you run curl 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=os' ? – rvs Jan 3 '12 at 9:09

migrated from stackoverflow.com Oct 19 '11 at 11:11

4 Answers

First you need to get connected, AFAIK CentOS 6 minimal set your network device to ONBOOT=No, just do a dhclient to your network interface and you should be up and running.

share|improve this answer

Try adding these entries to /etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4
share|improve this answer

I had the same problem yesterday and I spent hours trying to solve it. The solution ended up being simple.

Delete all the content of 'remi.repo' file and then execute

# yum update

It's done! The file's content will start the download again and be configured.

share|improve this answer
Where is this remi.repo file located? – user28377 Dec 6 '12 at 11:04
/etc/yum.repos.d/ – lost-theory Feb 6 at 20:40
I may have miss something, but where do you see he has the Remi's repo installed ? He clearly mentioned 'I finished installing CentOS6', I kind of doubt Remi's repo are configured. I might be wrong... – Spredzy May 14 at 22:21

For me I edited the file /etc/yum.repos.d/CentOS-Base.repo and uncommented baseurl.

[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.