I have installed 4 ubuntu servers on a virtual machine. same installation procedure where i set the proxy, domain, ip during the installation. it appears that 2 of the machine have no issues at all. both ping and apt-get. but for some unknown reason the other 2 can ping anything including security.ubuntu.com and us.archive.ubuntu.com but can't do sudo apt-get update .

so all of them have the file /etc/apt/apt.conf

Acquire::http::Proxy "";

What i've noticed here is that there is no port number for any of them.Even with that 2 servers still can update via apt-get

for now there is no http_proxy set in either /etc/environment.

Can anyone help you? thank you.

1 Answer 1


Try commenting Acquire::http::Proxy ""; and set http_proxy in bashrc

  • Hello Thanks for the response. you mean at the end of .bashrc ? But to do any apt-get one needs to be sudo so won't it be best if it's something like /etc/profile or /etc/environment ? Nov 28, 2012 at 17:55
  • AFAIK when you use sudo to gain root access, this is actually your user which gives a temporary privilege to use system commands and all of your environmental variable are valid there Nov 30, 2012 at 12:30

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.