[问题]不能使用apt-get更新了。

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

[问题]不能使用apt-get更新了。

#1

帖子 oo-BOON-too » 2008-09-20 10:31

昨天按照8.04.1配置指南应用了这个命令:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

之后再也不能使用apt-get了,请看一下为什么?


我查了一下 /etc/apt/sources.list.d/medibuntu.list的内容,很多是乱码,而另外下载一个http://www.medibuntu.org/sources.list.d/hardy.list 文件里面却没有乱码。
头像
oo-BOON-too
帖子: 118
注册时间: 2008-09-18 18:21

#2

帖子 oo-BOON-too » 2008-09-20 10:54

错误提示:

E: Type '<html>' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.

file:///etc/apt/sources.list内容如下,没有改动:
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy main universe restricted multiverse
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy main universe restricted multiverse

deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted

deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-updates universe main multiverse restricted
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ hardy-updates universe main multiverse restricted
上次由 oo-BOON-too 在 2008-09-20 10:58,总共编辑 1 次。
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

#3

帖子 delectate » 2008-09-20 10:57

提示说你的源文件已经不能读取,估计是损坏了,让你自己修复这个错误…………
头像
oo-BOON-too
帖子: 118
注册时间: 2008-09-18 18:21

#4

帖子 oo-BOON-too » 2008-09-20 12:33

顶,急呀
头像
hethe
帖子: 3666
注册时间: 2005-08-01 9:14

#5

帖子 hethe » 2008-09-20 12:35

代码: 全选

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
Gedanken ohne Inhalt sind leer .Anschauungen ohne Begriffe sind blind.
头像
oo-BOON-too
帖子: 118
注册时间: 2008-09-18 18:21

搞定,但还有一事不明。

#6

帖子 oo-BOON-too » 2008-09-20 12:59

刚才试着把这个目录及其下的文件全删了,/etc/apt/sources.list.d/*,现在可以用apt-get了,但没有搞清apt获取源的机理和先后顺序,难道在/etc/apt/目录下只要有文件夹,就优先从那里获取源吗?
头像
deepmist
帖子: 122
注册时间: 2008-05-10 13:18
来自: 江西

#7

帖子 deepmist » 2008-09-20 13:42

换源应该可以解决吧
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

#8

帖子 delectate » 2008-09-20 13:44

deepmist 写了:换源应该可以解决吧
换源?

稳妥起见,还是先恢复了再说吧
回复