sudo apt-sudo apt get updatee 404 错误,不堪折腾,求助

21927人阅读
linux问题汇总(1)
Linux开发(14)
最近在ubuntu 10.04下面装了一个虚拟机,在虚拟机里面又装了11.04的ubuntu,装好后用apt get install 出现Unable to locate packag错误,上网上查了下,说是要sudo apt-get update 就可以了,但是本地执行sudo apt-get update 命令后出现了如下错误:
natty/main TranslationIndex
natty/main Sources
natty/main i386 Packages
natty/main Translation-en_US
natty-security/universe Sources
Not Found [IP: 91.189.92.200 80]
natty-security/multiverse Sources
Not Found [IP: 91.189.92.200 80]
natty/main Translation-en
natty-security/universe i386 Packages
Not Found [IP: 91.189.92.200 80]
natty-security/multiverse i386 Packages
Not Found [IP: 91.189.92.200 80]
natty-security/main Sources
Not Found [IP: 91.189.92.200 80]
natty-security/restricted Sources
Not Found [IP: 91.189.92.200 80]
natty-security/main i386 Packages
Not Found [IP: 91.189.92.200 80]
natty-security/restricted i386 Packages
Not Found [IP: 91.189.92.200 80]
natty-security/main Translation-en_US
natty-security/main Translation-en
natty-security/multiverse Translation-en_US
natty-security/multiverse Translation-en
natty-security/restricted Translation-en_US
natty-security/restricted Translation-en
natty-security/universe Translation-en_US
natty-security/universe Translation-en
W: Failed to fetch http://cn./ubuntu/dists/natty/main/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty/restricted/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty/universe/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty/multiverse/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty/main/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty/restricted/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty/universe/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty/multiverse/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/main/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/restricted/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/universe/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/multiverse/source/Sources
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/main/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/restricted/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/universe/binary-i386/Packages
W: Failed to fetch http://cn./ubuntu/dists/natty-updates/multiverse/binary-i386/Packages
W: Failed to fetch /ubuntu/dists/natty-security/universe/source/Sources
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/multiverse/source/Sources
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/universe/binary-i386/Packages
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/multiverse/binary-i386/Packages
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/main/source/Sources
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/restricted/source/Sources
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/main/binary-i386/Packages
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty-security/restricted/binary-i386/Packages
Not Found [IP: 91.189.92.200 80]
W: Failed to fetch /ubuntu/dists/natty/main/source/Sources
W: Failed to fetch /ubuntu/dists/natty/main/binary-i386/Packages
E: Some index files failed to download. They have been ignored, or old ones used instead.
chaihuasong@chaihuasong:~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package git
发现很多源找不到,需要重新寻找更新源,最后把/etc/apt/sources.list文件中的地址换成我10.04中的etc/apt/sources.list文件后再执行sudo apt-get update 后就成功了,先贴上10.04上的source.list内容,如需要,直接替换即可
deb /ubuntu/ lucid main restricted universe multiverse
deb /ubuntu/ lucid-security main restricted universe multiverse
deb /ubuntu/ lucid-updates main restricted universe multiverse
deb /ubuntu/ lucid-proposed main restricted universe multiverse
deb /ubuntu/ lucid-backports main restricted universe multiverse
deb-src /ubuntu/ lucid main restricted universe multiverse
deb-src /ubuntu/ lucid-security main restricted universe multiverse
deb-src /ubuntu/ lucid-updates main restricted universe multiverse
deb-src /ubuntu/ lucid-proposed main restricted universe multiverse
deb-src /ubuntu/ lucid-backports main restricted universe multiverse
发现了这个源超级快的,是网易163更新服务器,亲测可用
搜狐更新服务器:
deb /ubuntu/ lucid main restricted universe multiverse
deb /ubuntu/ lucid-security main restricted universe multiverse
deb /ubuntu/ lucid-updates main restricted universe multiverse
deb /ubuntu/ lucid-proposed main restricted universe multiverse
deb /ubuntu/ lucid-backports main restricted universe multiverse
deb-src /ubuntu/ lucid main restricted universe multiverse
deb-src /ubuntu/ lucid-security main restricted universe multiverse
deb-src /ubuntu/ lucid-updates main restricted universe multiverse
deb-src /ubuntu/ lucid-proposed main restricted universe multiverse
deb-src /ubuntu/ lucid-backports main restricted universe multiverse
这个速度也非常快,国内的源就是牛x啊~~
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:512721次
积分:5683
积分:5683
排名:第3070名
原创:110篇
评论:131条
(1)(6)(2)(3)(1)(3)(3)(2)(2)(1)(2)(4)(4)(3)(2)(2)(2)(2)(2)(4)(1)(1)(3)(1)(1)(3)(2)(2)(5)(1)(1)(1)(5)(3)(6)(4)(8)(1)(5)(2)(2)(1)在旧版本Ubuntu系统中使用“apt-get update”出现“404 Not Found”错误的解决办法 - 吾爱源码
&>&&>&&&&在旧版本Ubuntu系统中使用“apt-get update”出现“404 Not Found”错误的解决办法
在旧版本Ubuntu系统中使用“apt-get update”出现“404 Not Found”错误的解决办法
作者:佚名 来源:吾爱源码
每一个Ubuntu发布版本都有它的结束时间,通常,Ubuntu发布版本支持18个月,而LTS (Long Term Support)(长期支持)版本分别支持3年(服务器版)和5年(桌面版)。当一个Ubuntu发布版本到达结束期后,它的库将不再能够访问,并且你也不会得到任何维护更新和安全补丁。当写这个的时候,13.04版本已经到底了它的结束期。如果你使用的是Ubuntu系统到达结束期了,你使用&apt-get&or&aptitude更新库时会得到以下错误提示:W:&Failed&to&fetch&http://us./ubuntu/dists/raring-backports/multiverse/binary-i386/Packages&&404&&Not&Found&[IP:&91.189.91.13&80]
W:&Failed&to&fetch&/ubuntu/dists/raring/main/binary-amd64/Packages&&404&&Not&Found
W:&Failed&to&fetch&/ubuntu/dists/raring-security/universe/binary-i386/Packages&&404&&Not&Found&[IP:&91.189.88.149&80]
E:&Some&index&files&failed&to&download.&They&have&been&ignored,&or&old&ones&used&instead对于那些使用旧版本的Ubuntu的用户,Canonical会维护 old- ,这是一个过期库的归档。因此,当Canonical支持的Ubuntu过期后,你必须把源切换到&old-(除非你想在过期前进行升级)。下面的方法通过切换到旧版本的源来解决“404 Not Found”错误。首先,使用旧版本的源来替换当前主源:$&sudo&sed&-i&-r&'s/([a-z]{2}\.)?/old-/g'&/etc/apt/sources.list
$&sudo&sed&-i&-r&'s//old-/g'&/etc/apt/sources.list然后使用文本编辑器打开&/etc/apt/sources.list&,找到&,这个库也不再支持13.04。所以你需要使用 “#” 号注释掉&。#deb&/ubuntu&raring&main
#deb-src&/ubuntu&raring&main现在,你应该能够在旧版本的Ubuntu系统上进行安装或者更新了。

我要回帖

更多关于 sudo apt get purge 的文章

 

随机推荐