apt-get update 失败

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
chuckhy
帖子: 4
注册时间: 2012-01-18 10:29

apt-get update 失败

#1

帖子 chuckhy » 2012-01-18 10:42

1.可以正常使用firefox访问各大网站,163更新源的镜像站点也可以用浏览器访问。
2.更新源设置的是163的。
sources.list文件内容如下
deb http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
3.公司开始是用代理访问网络的,那时候apt-get可以正常更新和使用。
现在取消了代理,每次使用apt-get update就会出现
0% [Connecting to 172.18.101.206 (172.18.101.206)]
执行结果:
root@chuck-desktop:~# apt-get update
Err http://mirrors.163.com lucid Release.gpg
Could not connect to 172.18.101.206:8080 (172.18.101.206). - connect (111: Connection refused)
Err http://mirrors.163.com/ubuntu/ lucid/main Translation-en_US
Unable to connect to 172.18.101.206:8080:
Err http://mirrors.163.com/ubuntu/ lucid/universe Translation-en_US
Unable to connect to 172.18.101.206:8080:
Err http://mirrors.163.com/ubuntu/ lucid/restricted Translation-en_US
Unable to connect to 172.18.101.206:8080:
Err http://mirrors.163.com/ubuntu/ lucid/multiverse Translation-en_US
Unable to connect to 172.18.101.206:8080:
Reading package lists... Done
W: Failed to fetch http://mirrors.163.com/ubuntu/dists/lucid/Release.gpg Could not connect to 172.18.101.206:8080 (172.18.101.206). - connect (111: Connection refused)

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/luc ... -en_US.bz2 Unable to connect to 172.18.101.206:8080:

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/luc ... -en_US.bz2 Unable to connect to 172.18.101.206:8080:

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/luc ... -en_US.bz2 Unable to connect to 172.18.101.206:8080:

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/luc ... -en_US.bz2 Unable to connect to 172.18.101.206:8080:

W: Some index files failed to download, they have been ignored, or old ones used instead.

尝试了其它更新源,均连接失败。同事的电脑和我的设置貌似都一样,但我的每次执行apt-get update就会出现
0% [Connecting to 172.18.101.206 (172.18.101.206)]
然后连接失败。
求分析原因。
thanks.
头像
ljj_jjl2008
论坛版主
帖子: 14255
注册时间: 2007-09-16 8:29

Re: apt-get update 失败

#2

帖子 ljj_jjl2008 » 2012-01-18 10:44

ping 一下源,看看。
chuckhy
帖子: 4
注册时间: 2012-01-18 10:29

Re: apt-get update 失败

#3

帖子 chuckhy » 2012-01-18 11:34

ping mirrors.163.com 可以ping通,用浏览器访问也正常。
头像
ljj_jjl2008
论坛版主
帖子: 14255
注册时间: 2007-09-16 8:29

Re: apt-get update 失败

#4

帖子 ljj_jjl2008 » 2012-01-18 11:36

难道是代理的端口问题?代理不支持8080端口?
chuckhy
帖子: 4
注册时间: 2012-01-18 10:29

Re: apt-get update 失败

#5

帖子 chuckhy » 2012-01-18 14:17

现在已经取消使用代理了
最开始是用代理的,那时可以正常使用apt-get访问更新源。
chuckhy
帖子: 4
注册时间: 2012-01-18 10:29

Re: apt-get update 失败

#6

帖子 chuckhy » 2012-01-28 14:33

求解!
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: apt-get update 失败

#7

帖子 windwhinny » 2012-01-28 16:24

不知道为什么,但是我想说的是。。。。。最好不要用root用户,而是:

代码: 全选

sudo apt-get update
头像
lainme
论坛版主
帖子: 7805
注册时间: 2008-09-13 19:17
系统: Arch Linux (x86_64)
联系:

Re: apt-get update 失败

#8

帖子 lainme » 2012-01-28 20:56

如果确实取消了,不应该出现这个

172.18.101.206:8080

系统的代理和apt-get的代理设置的地方不一样。再检查下?
tivooooli
帖子: 88
注册时间: 2008-06-04 12:50
来自: Beckosecurity
联系:

Re: apt-get update 失败

#9

帖子 tivooooli » 2012-02-22 8:45

我有时候也出现这个问题,往往过一段时间重试就好了,感觉是服务器出了问题。
www.beckosecurity.com
----
TivooooLi
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: apt-get update 失败

#10

帖子 eexpress » 2012-02-22 10:07

使用代理没问题。出现8080不应该。
● 鸣学
头像
xw_y_am
帖子: 3333
注册时间: 2009-05-08 14:18
系统: Arch
来自: 河南新乡
联系:

Re: apt-get update 失败

#11

帖子 xw_y_am » 2012-02-22 10:54

apt-get 的设置问题??
Linux 相关链接大杂烩

代码: 全选

if(read) {
    if(practise) return g☘☘d;
    else return w☘☘d;
} else {
    return t☘☘d;
}
mickey_51
帖子: 6
注册时间: 2012-07-19 15:49

Re: apt-get update 失败

#12

帖子 mickey_51 » 2012-11-05 14:57

:em06 我也是这个问题 怎么办能~ 刚刚安装好的64位 ubuntu 12.04 更新源就出错· 气死了 换了cn99的一样是错 怎么办呢 怎么办呢
头像
nexus-s
帖子: 425
注册时间: 2012-05-09 0:06
系统: Ubuntu 16.04.3 LTS

Re: apt-get update 失败

#13

帖子 nexus-s » 2012-11-14 13:24

你可以自行设置apt-get 的代理,比如申请咯goagent,然后直接http代理来更新:
1.

代码: 全选

export http_proxy="http://127.0.0.1:8087"
2.sudo 执行apt-get 的需要添加
Defaults env_keep = "http_proxy https_proxy ftp_proxy"
到/etc/sudoers文件里面

代码: 全选

sudo visudo
然后编辑添加到Default secure_path这一行下面
详情参考这里:https://help.ubuntu.com/community/AptGe ... http-proxy
头像
Arz
帖子: 65
注册时间: 2010-04-01 19:54
系统: macOS

Re: apt-get update 失败

#14

帖子 Arz » 2012-11-14 21:30

这个应该是没有取消掉代理吧?
rodey12
帖子: 1
注册时间: 2014-05-07 11:20
系统: Ubuntu12.04

Re: apt-get update 失败

#15

帖子 rodey12 » 2014-05-07 11:23

Ubuntu12.04 apt-get update and apt-get install error, like .... Unable to connect to xxx:xxx:xxx:xxx:8080

Please link to :
http://hi.baidu.com/vogoispszhagqrr/ite ... bd30c19930
回复