[问题]我的Ubuntu可以上网,但是无法在终端用apt-get更新

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
simonsf
帖子: 4
注册时间: 2005-09-22 21:10

[问题]我的Ubuntu可以上网,但是无法在终端用apt-get更新

#1

帖子 simonsf » 2005-09-22 21:24

我这里是通过代理服务器上网,网络里面已经设置好了代理和用户密码,用firefox上网也没有问题。
然后是设置源。
sudo gedit /etc/apt/sources.list
我把打开的文本中的内容替换为下面。
deb http://archive.ubuntu.org.cn/ubuntu hoary main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu hoary-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu hoary-updates main restricted universe multiverse

然后用终端运行命令
sudo apt-get update

终端显示连接到archive.ubuntu.org.cn和其ip地址
0%连接,过一段时间就连接超时断了。

我不明白的是,上网已经没问题了,为什么不能从终端上网更新呢?
有没有遇到同样问题的,讨论一下好吗?
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#2

帖子 leal » 2005-09-22 22:23

在synaptic里,可以设置代理服务器;

shell里apt-get也有设置代理服务器的选项,请man 或 --help
用心×恒 | 豆瓣 | 门户 | Blog
simonsf
帖子: 4
注册时间: 2005-09-22 21:10

#3

帖子 simonsf » 2005-09-22 22:57

thank you very much! I have fixed this problem!

quote from internet:
怎么设置代理服务器呢?

你把你的 /etc/apt/apt.conf 改成别的名字,然后创建一个新的,内容只包括以下这行即可:

Acquire::http::Proxy "http://xxx.xxx.xxx.xxx:xxxx";

或者在终端中

export http_proxy=http://xxx.xxx.xxx.xxx:xxxx
sunset_ayq
帖子: 43
注册时间: 2005-10-02 18:54

#4

帖子 sunset_ayq » 2005-10-17 19:54

KennyChen
帖子: 50
注册时间: 2007-05-08 11:15
来自: 中国广东

#5

帖子 KennyChen » 2007-05-08 23:49

我也遇到同样的问题,关心中。。。。
yjx1102
帖子: 8
注册时间: 2011-02-01 22:06

Re: [问题]我的Ubuntu可以上网,但是无法在终端用apt-get更新

#6

帖子 yjx1102 » 2011-11-06 13:44

本人也遇到这个问题,试了好多个方法还是搞不定
希望有高手帮忙解决。
链接在http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=352462
linctus
帖子: 60
注册时间: 2007-06-27 22:35

Re: [问题]我的Ubuntu可以上网,但是无法在终端用apt-get更新

#7

帖子 linctus » 2011-11-07 8:44

3楼正解。
xinxin19871118
帖子: 40
注册时间: 2011-11-15 20:43

Re: [问题]我的Ubuntu可以上网,但是无法在终端用apt-get更新

#8

帖子 xinxin19871118 » 2011-12-18 10:47

报告一下哈
4L的链接俺这打不开了。
2011.12.18
回复