9

在 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.
4

4 回答 4

11

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

参考源1ubuntu论坛

它对我有用

于 2018-01-31T06:44:54.977 回答
9

就我而言:

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 
于 2018-02-05T01:17:33.747 回答
2

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

我不得不将 /etc/apt/sources.list 中的“us.archive.ubuntu.com”和“security.ubuntu.com”替换为“old-releases.ubuntu.com”,然后我才能完成下载一些包裹,就像 Ayush Kumar 说的那样。

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

我不得不将--allow-unauthenticated标志与 sudo apt-get update 一起使用。

sudo apt-get update --allow-unauthenticated

然后我能够完成更新。

于 2018-02-27T20:07:04.037 回答
0

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

于 2018-01-27T04:13:38.097 回答