Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 "10.10.19.21";

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

1 Answer 1

up vote 1 down vote accepted

Try commenting Acquire::http::Proxy "10.10.19.21"; 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

 
discard

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.