4

I just installed Ubuntu Server 12 in a virtual machine in VirtualBox, but apt-get didn't let me install anything, when i tried apt-get install git i got Failed to fetch errors,

Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/git/git-man_1.7.9.5-1_all.deb  Connection failed [IP: 91.189.91.15 80]

after that i run apt-get updateeverything goes well except for 2 urls.

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Connection failed [IP: 91.189.91.15 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Connection failed [IP: 91.189.91.14 80]

I tried to wget http://us.archive.ubuntu.com/ubuntu/pool/main/g/git/git-man_1.7.9.5-1_all.deb i have this error:

HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.

Edit:

Here is my networking configuration:

Net Config

Yes I can ping the IP: 91.189.91.15 from both the Guest(my machine) and the Host(the virtual one).

4
  • Are you behind a proxy?
    – Braiam
    Nov 30, 2013 at 13:59
  • No i'm not, and this ubuntu is in a virtual box machine.
    – elaich
    Nov 30, 2013 at 14:02
  • What country are you from?
    – KI4JGT
    Nov 30, 2013 at 14:22
  • Do you have any other virtual machines running at the same time? Do they all have distinct MAC addresses? Vbox bridged networking with wireless interfaces has to do some packet rewriting, and I wonder whether multiple VMs with the same MAC could cause some packets to be misdirected. Dec 1, 2013 at 23:04

1 Answer 1

1

http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg

This url is valid, so it's problem with your machine, guest or host. Can you open this URL on your Virtualbox host machine (it's computer you use to run Virtualbox and manage virtual machines)?

Try ping 91.189.91.15 to check if you have connection to repository server.

Also, check your Virtualbox settings. Default network type to use Internet on Virtualbox is NAT. Try to set following settings on your virtual machine (MAC address should be different)

VirtualBox NAT

4
  • I can get the gpg key from my browser, Guest Machine, but wget http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg from the virtual machine returns (Connection reset by peer) error
    – elaich
    Nov 30, 2013 at 16:28
  • @elaich You mean your Host Machine, right? I see in your edited question, that you misunderstood host/gust machine. Host is "your machine" and Guest "the virtual one". Also, have you tried setting VirtualBox NAT? Nov 30, 2013 at 16:30
  • It Worked with NAT, but I need to configure the Bridged Adapter, to be able to ssh into the virtual machine.
    – elaich
    Nov 30, 2013 at 16:44
  • @elaich It is possible to have up to four network cards in your virtual machine, so you may keep both NAT and Bridged Adapter. However, it sound more like workaround than a solution... Nov 30, 2013 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .