Ubuntu 17.04 上的 sudo apt-get 更新失败

sudo apt-get update fail on Ubuntu 17.04

运行 ubuntu 17.04 Zesty Zapus 上的 sudo apt-get update 时,出现以下错误。我已经在错误行上发布了。我想安装 python 像 matplotlib 和 tkinter 这样的库,但安装失败是因为上面的命令没有 运行 成功。请建议我该怎么做。

Err:9 http://security.ubuntu.com/ubuntu zesty-security/main amd64 Packages
  404  Not Found [IP: 2001:67c:1560:8001::14 80]
Err:25 http://in.archive.ubuntu.com/ubuntu zesty/main i386 Packages
  404  Not Found [IP: 2001:67c:1360:8001::21 80]
Err:81 http://in.archive.ubuntu.com/ubuntu zesty-updates/main amd64 Packages
  404  Not Found [IP: 2001:67c:1360:8001::21 80]
Err:113 http://in.archive.ubuntu.com/ubuntu zesty-backports/main amd64 Packages
  404  Not Found [IP: 2001:67c:1360:8001::21 80]
Reading package lists... Done
W: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/main/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1560:8001::14 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty/main/binary-i386/Packages  404  Not Found [IP: 2001:67c:1360:8001::21 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty-updates/main/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1360:8001::21 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty-backports/main/binary-amd64/Packages  404  Not Found [IP: 2001:67c:1360:8001::21 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

17.04 没有得到 Ubuntu 的进一步支持。因此,对我有用的解决方案是将其升级到 17.10,因为 none 其他解决方案有所帮助。

你可以通过以下方式解决: 只需将 /etc/apt/sources.list 中的 us.archive.ubuntu.com 和 security.ubuntu.com 替换为 old-releases.ubuntu.com 即可能够完成更新。

参考source 1 and ubuntu forum

对我有用

就我而言:

sed -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list 
sed -e 's/security.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list 

就我而言,我可以通过执行以下操作下载一些软件包:

我必须用 "old-releases.ubuntu.com" 替换 /etc/apt/sources.list 中的 "us.archive.ubuntu.com" 和 "security.ubuntu.com" 然后我才能完成下载一些包,比如 Ayush Kumar说。

对于我的托管公司 Linode 列出的其他更新,我使用了以下内容:

我不得不在 sudo apt-get 更新中使用 --allow-unauthenticated 标志。

sudo apt-get update --allow-unauthenticated

然后我就可以完成更新了。