更新 ubuntu 服务器 apt-get 给我 - 404 Not Found

jor*_*rnk 13 updates apt 11.04

我正在尝试更新 Ubuntu 服务器,当我运行 apt-get update 时,出现了许多错误,如下例所示(注意我在 http 后添加了一些空格)。

Err http  ://no.archive.ubuntu.com natty/main Sources  404  Not Found
Err http  ://no.archive.ubuntu.com natty/restricted Sources 404  Not Found
Run Code Online (Sandbox Code Playgroud)

W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources  404  Not Found
W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/restricted/source/Sources  404  Not Found

I tried to replace all occurrences of http   ://no.archive.ubuntu.com/ with http  ://archive.ubuntu.com/
Run Code Online (Sandbox Code Playgroud)

但似乎所有这些档案都消失了......

Ubuntu 版本:lsb_release -a 没有可用的 LSB 模块。发行商 ID:Ubuntu 描述:Ubuntu 11.04 版本:11.04 代号:natty

我该如何清理这个烂摊子?感谢您的帮助!j

sos*_*tee 32

我认为问题是因为您使用的是相对较旧的 Ubuntu 版本。一个可能的解决方法是/etc/apt/sources.list使用您选择的编辑器打开文件。全部(xx.)archive.ubuntu.com更改为old-releases.ubuntu.com.. 在你的情况下,一个例子将://archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources成为

://old-releases.ubuntu.com/ubuntu/dists/natty/main/source/Sources
Run Code Online (Sandbox Code Playgroud)

在此之后,您可以尝试运行 sudo apt-get update

为了更新您的版本,您需要update-manager-core(sudo apt-get install update-manager-core)然后sudo do-release-upgrade但这会将您更新到下一个版本并且必须重复直到您达到具有长期支持的 12.04 LTS。

  • 谢谢!这解决了问题!我还必须更改为 security.ubuntu.com 的旧版本 (8认同)