我刚刚使用Ubuntu 17.04创建了一个新的Google Cloud Compute Engine服务器作为启动盘:
Ubuntu 17.04
amd64 zesty image built on 2017-12-08
在执行任何其他操作之前,如果我尝试运行sudo apt-get update
,我会收到以下错误:
Ign:1 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty InRelease
Ign:2 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-updates
InRelease
Ign:3 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-backports InRelease
Ign:4 http://security.ubuntu.com/ubuntu zesty-security InRelease
Err:5 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty Release
404 Not Found [IP: 35.195.241.40 80]
Err:6 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-updates Release
404 Not Found [IP: 35.195.241.40 80]
Err:7 http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-backports Release
404 Not Found [IP: 35.195.241.40 80]
Err:8 http://security.ubuntu.com/ubuntu zesty-security Release
404 Not Found [IP: 91.189.88.161 80]
Hit:9 http://archive.canonical.com/ubuntu zesty InRelease
Reading package lists... Done
E: The repository 'http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty-backports Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
查看http://europe-west1.gce.archive.ubuntu.com/ubuntu/我可以在不到一小时前看到今天的更新。
这是Google的错误还是我做错了什么?
答案 0 :(得分:17)
我确认“E:存储库'http://ru.archive.ubuntu.com/ubuntu zesty Release'不再有发布文件。”
按照heroin中的https://smyl.es/how-to-fix-ubuntudebian-apt-get-404-not-found-package-repository-errors-saucy-raring-quantal-oneiric-natty/之前的建议解决。
在您的服务器上运行以下命令,它将使用old-releases.ubuntu.com替换所有archive.ubuntu.com和security.ubuntu.com软件包存储库URL
sudo sed -i -e's / archive.ubuntu.com \ | security.ubuntu.com/old-releases.ubuntu.com/g'/etc/apt/sources.list
不幸的是,如果您选择了一个国家镜像(如us.archive.ubuntu.com
进行更新),则此sed命令将不适用于您。然后可以更新文件/etc/apt/sources.list中的字符串,更改所有条目,如{在文本编辑器中手动{1}}和http://*.archive.ubuntu.com
http://*.security.ubuntu.com
,
http://old-releases.ubuntu.com
或
sudo nano /etc/apt/sources.list
例如,您的sudo vi /etc/apt/sources.list
变为http://europe-west1.gce.archive.ubuntu.com/ubuntu zesty InRelease
,依此类推。
这是我的更新文件/etc/apt/sources.list:
http://old-releases.ubuntu.com/ubuntu zesty InRelease
答案 1 :(得分:8)
17.04现在已于2018年1月13日结束。您需要转到更新版本或使用长期稳定版本: https://wiki.ubuntu.com/Releases
答案 2 :(得分:2)
Zesty不再拥有发布文件,确实"终止生命周期"
我有同样的问题,解决方案在这个链接中,它对我有用......
https://help.ubuntu.com/community/EOLUpgrades
希望我的回答会有所帮助。
答案 3 :(得分:0)
这个问题似乎不是谷歌方面的问题,而是因为你试图从HTTP而不是HTTPS获取更新。
尝试使用apt-get:
这个选项--allow-unauthenticated
Ignore if packages can't be authenticated and don't prompt about it. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn't ensured in another way by the
user itself. The usage of the Trusted option for sources.list(5) entries should usually be preferred over this global override. Configuration Item: APT::Get::AllowUnauthenticated.