INFO: I am using Windows 7 Pro (64bit) with VMware Workstation version 10.0.1 . I am using CentOS(64bit) 6.5 minimal, for the first time. I am running this from my workplace network, which may use a proxy server.

Background: I have been following this tutorial (http://1stopit.blogspot.com/2013/11/creating-centos-64-minimal-vm-with.html)

As recommended in the tutorial, I configured the VM to used bridged networking, rather than NAT (which is the default).

At first, when trying to run yum update I received a PYCURL ERROR 6, it looked like this:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
could not retreive 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

Then I tried to run ping mirrorlist.centos.org, which resulted in ping:unknown host mirrorlist.centos.org

Then I tried: ifdown eth0 then ifup eth0, which yielded: Determining IP information for eth0... failed.

This below is the current contents of my file at /etc/sysconfig/network-scripts/ifcfg-eth0:


(I didn't know if I should be showing my HWADDR and UUID, so I left it anonymous)

Since I am trying to run this from my workplace(which may use a proxy server), I thought I would try the recommendations here https://unix.stackexchange.com/a/93428/60724, and edit /etc/yum.conf, I added proxy=http://xxx.xxx.xx.xx:8080, here is the full file of yum.conf:

bugtracker_url=http://bugs.centos.org/set_project.php?     project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum


Then after that when I tried to run yum update, I started to receive PYCURL Error 5, rather than PYCURL Error 6, see this:

running yum update results in:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
4&repo=os error was
14: PYCURL ERROR 5 - "Couldn't resolve proxy 'xxx.xxx.xx.xx'"
Error: Cannot find a valid baseurl for repo:base

It is a bug of Centos/RHEL 6.x minimal install. Network is not activated during installation, because for some reason, they expect all installations to use Network Manager. Change the line ONBOOT="no" to ONBOOT="yes" in the file /etc/sysconfig/network-scripts/ifcfg-eth0 (or whatever your eth connection number is).

Btw, using ifconfig is deprecated, instead use 'ip a' and/or 'ip r'.

  • ONBOOT=yes is already set for whatever centos:6 resolves to in Docker as of today.
    – Neil
    Nov 4 '15 at 21:32

first you need to figure out if you are getting through the proxy

curl http://www.google.com URL --proxy http://xxx.xxx.xx.xx:8080

if it is at work, I bet you it is an authenticated proxy.. save this script below as connect.sh, chmod +x connect.sh to make it runable. then run

echo -n "User:";
read user
echo -n "Password:";
read -s password 


if http_proxy="$proxy" curl -silent http://www.google.com | grep authentication_failed;
        echo NO CONNECT
        unset http_proxy
        echo -n OK
        http_proxy="$proxy" $*

then run ./connect.sh 'yum upgrade'

if it doesn't work, it might be the mirror this is an example of my EPEL /etc/yum.repo.d/epel.repo use a working mirror full path


Run ifconfig -a and show me you've got a real, usable IP. I Bet moving out from behind the NAT also lost you a DHCP (via dnsmasq) server from which to get a usable IP, and you're not getting one.

Easiest thing is to get behind that NAT again and be well (service network restart or just reboot) .

Otherwise, if you ARE getting a usable IP from some DHCP on the network you're bridged to, we should examine your DNS and Routing. I'm sure it's as simple as you can't reach DNS (or anything) and that's why you can't get anywhere. So cat /etc/resolv.conf and route -n if you have a real, usable IP on your VM's NIC.

  • Results of ifconfig -a : eth1 link encap:Ethernet HWaddr 00:0C:29:A3:A1:62 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overuns:0 frame:0 TX packets:0 erros:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 TX bytes:0 lo link encap: Local Loopback inet addr: Mask: inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU: 16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dopped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1264 TX bytes:1264 I don't know what it means. Apr 11 '14 at 15:46

ran across this while setting up CentOS 6.5 with the same issue. My system was working with a static IP address and then boom!!! not working. the only difference was that I had installed XFCE gui (specs are not great) and then the X11 fonts package...

Somehow, when I checked the ifconfig, the static info was there but the nameserver information in /etc/resolv.conf had disappeared....? I cannot imagine how the install of the GUI would do this but it was the only difference.

How did I find this...? I could ping etc but not a domain name like google.com. So, I tried curl http://www.google.com and the default entries in resolv.conf came up saying there were no nameservers present

once I put them in, all was fine.

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.