how to install packages with apt-get on a system connected via proxy?
This method worked for me.....just have a try...
check the file /etc/apt/apt.conf
The contents were,
Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";
This was the reason why you could reach proxy but couldn't get past it, since there is no username password information. So just put that info into it..
Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";
Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
save the file and you are done...
BROTIP: More better add these lines in another file, /etc/apt/apt.conf.d/80proxy
. This will ensure that after a version upgrade changes won't be lost.
To configure a proxy temporary, set the http_proxy
environment variable. If the proxy is proxy.example.com
on port 8080
and you need to authenticate with username user
and password pass
, run:
sudo http_proxy='http://user:[email protected]:8080/' apt-get install package-name
To set such a proxy permanently, create /etc/apt/apt.conf.d/30proxy
containing:
Acquire::http::Proxy "http://user:[email protected]:8080/";
The changes are immediately visible the next time you run apt.
An alternative is to use Synaptics Package Manager, setting in its Preferences the proxy to which you want to connect. You can find the configuration using this path: Settings -> Preferences -> Network