Yum update error: Could not retrieve mirrorlist
It looks like you don't have the proxy information configured in your repo file. According to http://www.centos.org/docs/5/html/yum/sn-yum-proxy-server.html, you have to specify your proxy, proxy_username, and proxy_password in yum.conf
. This doc is for CentOS 5, but it should hold for CentOS 6 as well.
I had the same issue regarding this error: Cannot find a valid baseurl for repo: base and Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os&infra=stock
As root (su - root) and provide your username password, you should be in the sudoers file.
Then:
vim /etc/yum.repos.d/CentOS-Base.repo
Modify all only these three sections (base, update and extra) by adding the correct baseurl depending on your centos versions. Keep uncommented the previous baseurl.
Just add this line in all 3 sections:
baseurl=http://mirror.centos.org/centos/6.6/os/i386/
The issue is that yum doesn't find the correct url (obsolete).
I did it and yum just started uploading the packages. No Proxy needed (use proxy if your connection need it), other direct internet connection in you centos settings. Good Luck.
In my case, I have a proxy:port settings. I edited the /etc/yum.conf file, but forgot the port number after the proxy= entry.
proxy=http://your.proxyhost.org:8080
I was seeing this exact error as stated above, so I rechecked the yum.conf file and added the correct port and it works.