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

在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


版权声明:本文为yuan882696yan原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。