How to install packages with apt…

Abstract :
The apt-get work via proxy.

Introduce :
Proxy is widespread using in network. Ubuntu is base on Linux and it can use proxy too. However the apt-get is not working if u only set proxy on OS.

Recently, I got Ubuntu 10.04 system connected via a proxy to the internet and I found apt-get can't work. So next is the solution.

1. Check the file /etc/apt/apt.conf.
2. if it is not here, create it.
3. Add these contents :

Acquire::http::proxy "http://<proxy>:<port>/"; 
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";

4. If ur proxy has password, u should add these :

Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";    
Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/"; 
Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";


5. Save the file and it will work. 


Reporter : Nick Chan


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值