您的位置:首页 > 其它

在Ubuntu 11.04中执行sudo apt-get update命令时出现404错误

2015-07-01 12:16 417 查看
在Ubuntu 11.04中执行sudo apt-get update命令时,遇到以下错误:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.91.24 80]

http://security.ubuntu.com/ubuntu/dists 网站上一看,果然没有了n开头的,所以报了404错误,经查资料,得出了以下结论:

The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at http://old-releases.ubuntu.com

Ubuntu 11.04的生命周期已经结束,不再提供更新,如扔使用,需要到 http://old-releases.ubuntu.com 上下载所需包。

解决方法:

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com to old-releases.ubuntu.com

执行以下命令:

sudo sed -i -re ‘s/([a-z]{2}.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g’ /etc/apt/sources.list

参考:

http://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: