Apt-get 如何在Ubuntu/Debian上正常工作

1. 为避免80:80错误,编辑文件 ‘/root/.bashrc’, 并设置如下

### set http proxy variables

export http_proxy="http://itgproxy.redmond.corp.microsoft.com:80"

                      export https_proxy="https://itgproxy.redmond.corp.microsoft.com:80"   


2. 将 ‘/etc/apt/sources.list’ 配置如下:


# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ -Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main

deb http://ftp.us.debian.org/debian/ wheezy main

deb-src http://ftp.us.debian.org/debian/ wheezy main


deb http://security.debian.org/ wheezy/updates main contrib

deb-src http://security.debian.org/ wheezy/updates main contrib


# wheezy-updates, previously known as 'volatile'

# A network mirror was not selected duringinstall.  The following entries

# are provided as examples, but you should amend themas appropriate

# for your mirror of choice.


deb http://ftp.debian.org/debian/ wheezy-updates main contrib

deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib 


                      注:wheezy  [Debain 7], [Debain 6] squeeze,[Debian 8]  jessie.




3. Reboot


4. 更新资源库

    apt-get update


5. 此命令生效。

    apt-get install xxxx


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值