![apt-get update 不起作用(未找到 [IP:91.189.92.201 80])](https://linux22.com/image/842947/apt-get%20update%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%EF%BC%88%E6%9C%AA%E6%89%BE%E5%88%B0%20%5BIP%EF%BC%9A91.189.92.201%2080%5D%EF%BC%89.png)
当我尝试运行 apt-get update 时,出现以下错误消息:我正在使用:
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-security/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.92.201 80]
E: Some index files failed to download. They have been ignored, or old ones used
我尝试了几种解决方案:
就像从 Ubuntu 软件部分选择最佳服务器:它从来没有能够选择最佳服务器,因为它给出错误(检查您的互联网连接。)我的互联网运行良好,我可以浏览。
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo dpkg --configure -a
什么都没起作用。我无法发布完整的错误消息,因为它不允许我发布两个以上的链接。
答案1
Natty 不再受支持或无法更新。您需要从存档.ubuntu.com到旧版本服务器,这就是您提到的 sed 命令的目的(我还没有机会确认它是否有效)。打开并替换以下文件中的所有条目:
sudo gedit /etc/apt/sources.list
然后像平常一样运行更新和升级命令。