1

I'm running Ubuntu 12.04 Server (guest machine) on VirtualBox having Windows 7 as host machine. I tried to get updates through sudo apt-get update command but i end-up with the following error codes :-

Err http://in.archive.ubuntu.com precise Release.gpg
   Temporary failure resolving 'in.archive.ubuntu.com'
Err http://security.ubuntu.com precise-security Release.gpg
   Temporary failure resolving 'security.ubuntu.com'
Err http://in.archive.ubuntu.com precise-updates Release.gpg
   Temporary failure resolving 'in.archive.ubuntu.com'
Err http://in.archive.ubuntu.com precise-backports Release.gpg
   Temporary failure resolving 'in.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg
  Temporary failure resolving 'in.archive.ubuntu.com'

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg
  Temporary failure resolving 'in.archive.ubuntu.com'

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg
  Temporary failure resolving 'in.archive.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg
  Temporary failure resolving 'security.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

I also tried the following things :-

1) Deleted the Virtual VM & installed it again.

2) Changed Network Adapter right from Host-Only to Briged.

3) I used sudo apt-get autoremove/remove/clean commands which i get known while googling for the answer.

4) Editing the /etc/apt/sources.list file.

Please help me out because i want to do the updates & upgrades first before starting the other server things !!

Thanks in advance

gurupal singh
  • 305
  • 4
  • 9
  • 16

2 Answers2

1

Your issue is that something between your VM and the 'outside' (that is, outside your computer) is blocking connections to the internet.

You said you're using a Windows 7 host, and VirtualBox.

Some steps to check:

  1. Make absolutely certain that your VM is set to either Bridged Mode (and linked to an actively-connected network adapter) or NAT.
  2. Check your Windows firewall settings - check to see if the VirtualBox application is permitted to connect to the network on both Public and Private networks (this covers the Windows "Public", "Work", and "Home" network classes).
  3. Specifically tell Windows to permit outbound connections from the VirtualBox applications and parts.

After step 3, check if the connection works going outbound - pinging 8.8.8.8 or trying a dig on google.com.

Thomas Ward
  • 74,764
0

It seems that you can`t able to access Ubuntu archives (in.archive.ubuntu.com). May be you are not connected to the Internet. Change the VirtualBox network adapter to NAT mode. Then try again. NAT enables the Guest OS to access the Internet.

Rajiv
  • 101
  • yes, i had already connected to NAT mode after i tried for Host-Only & Briged Adapters & my internet is perfectly working on host machine. There is no issue of internet. – gurupal singh Dec 22 '14 at 13:06
  • @gurupalsingh this is a networking issue - either with your firewall permissions or otherwise - the network in the VM can't see out to the Internet which IS a network problem – Thomas Ward Dec 22 '14 at 13:09
  • @ThomasW. Is there any solution for this as you said it is the firewall issue or something like that. Please help me out !! – gurupal singh Dec 22 '14 at 13:12
  • @gurupalsingh try pinging 8.8.8.8 from the VM and tell me if the pings are returned or whether it's just getting failures. (DO NOT paste the output here) – Thomas Ward Dec 22 '14 at 13:14
  • @ThomasW.I tried pinging with 8.8.8.8 but its returns with an error "Connect : Network is unreachable" !! – gurupal singh Dec 22 '14 at 13:19
  • Do you have the different adapter type in the Virtual Box Network Settings.Try to change that one. – Rajiv Dec 22 '14 at 13:47