Apt-get through proxy
23 Aug 2016First, try with this :
<pre style="background-color: #eff0f1; border: 0px; color: #111111; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;">sudo http_proxy='http://user:pass@proxy.example.com:8080/' apt-get install package-name</pre><div style="background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, "libra sans", sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">
If that doesn’t work, open the following file sudo nano /etc/apt/apt.conf</div><div style="background-color: white; border: 0px; clear: both; color: #111111; font-family: Ubuntu, Arial, "libra sans", sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;">Edit the content to be as below :</div><pre style="background-color: #eff0f1; border: 0px; color: #111111; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;">Acquire::http::proxy "http://</pre>
Acquire::ftp::proxy "ftp://
Acquire::https::proxy "https://