您的位置:首页 > 其它

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

2015-10-26 16:22 381 查看
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


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: