Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and 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.

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
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 ? – black sensei Nov 28 '12 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 – Danial Behzadi Nov 30 '12 at 12:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.