If you are setting up Debian on a network that is behind a proxy server, you will probably have trouble getting out onto the internet using apt-get. Luckily this isn’t too hard to fix.
To fix it permanently simply edit your
/etc/bash.bashrc file and add these lines:
To fix it on a case by case basis, just run each command, like this:
# export http_proxy=http://username:email@example.com:port/
NOTE : I have also seen the problem where I have done this on one network, then changed to a network without a proxy and the system continues to look for the proxy even though I have removed these lines from my .bashrc file.
The way around it is to set the http_proxy and ftp_proxy values to null. Like this:
# export http_proxy=
# export ftp_proxy=