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 wish to update the local package index with the latest changes made in repositories and am using following command :

 sudo apt-get update 

On executing this command I get several error messages such as one below :

W: Failed to fetch  407  Proxy Authentication Required

What i did to in order to try resolving this issue is the following :

Open terminal and the file


 sudo gedit /etc/bash.bashrc

and add at the bottom of the file these 2 lines :

 export http_proxy=http://user:password@host:port/
 export ftp_proxy=http://user:pass@host:port/

However it is still not working for me and am getting the same error.

Thanks in advance.

share|improve this question

try to edit /etc/apt/apt.conf like this

Acquire::http::proxy "http://'proxy':'port'/";
Acquire::ftp::proxy "ftp://'proxy':'port'/";
share|improve this answer

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.