谷歌计算引擎Ubuntu 17.04 zesty不再具有发布文件。

15

我刚使用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/ 的更新。

这是谷歌的错误还是我做错了什么?


1
Zesty不再受支持,所以您必须像Denis建议的那样升级它。 - Anders
4个回答

24

我确认"E: The repository 'http://ru.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file."。

如先前由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 中所有类似于 http://*.archive.ubuntu.comhttp://*.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变成了http://old-releases.ubuntu.com/ubuntu zesty InRelease等等。
这是我更新后的文件/etc/apt/sources.list:
# deb cdrom:[Kubuntu 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ zesty main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ zesty universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty universe
deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ zesty multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty multiverse
deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu zesty partner
# deb-src http://archive.canonical.com/ubuntu zesty partner

deb http://old-releases.ubuntu.com/ubuntu zesty-security main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu zesty-security main restricted
deb http://old-releases.ubuntu.com/ubuntu zesty-security universe
# deb-src http://old-releases.ubuntu.com/ubuntu zesty-security universe
deb http://old-releases.ubuntu.com/ubuntu zesty-security multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu zesty-security multiverse

谢谢您。我切换到17.10的主要问题是GitLab Runner尚未得到支持。虽然其他一切都很好,但我已经找到了一个临时解决方案。这是现有服务器的一个很好的替代品,谢谢。 - chapmanio

8

1
但问题特定于Google Cloud Compute Engine和/etc/apt/source.list定义。 GCE提供Ubuntu 17.04,然后不支持上述文件中的自己的定义是没有意义的。他们还提供Ubuntu 14.04和16.04,我可以启动并运行'sudo apt-get update'而不会出现任何错误(尽管我知道这些是长期稳定版本)。这感觉像是他们的错误,但您的链接表明他们不应再提供17.04... - chapmanio
2
我可以确认问题的原因与@Jeremy提到的相同。我已经联系后端团队更新GCE Ubuntu 17.04镜像。 - Faizan
@Faizan 我可以确认Ubuntu 17.04镜像已经从GCE的启动磁盘列表中删除了。不幸的是,这对我没有帮助! - chapmanio
2
按照Denis的答案操作,你就能解决问题了,chapmanio。在Google Cloud计算引擎上,你应该可以编辑/etc/apt/sources.list文件,然后像建议的那样运行“sudo do-release-upgrade”。 - Anders

1

Zesty不再具有发布文件,实际上是“生命周期结束”

我遇到了同样的问题,解决方案在此链接中,对我有效...

https://help.ubuntu.com/community/EOLUpgrades

希望我的回答能够帮到您。

1
那是正确的答案,但丹尼斯将源代码整合到一个不依赖于可能会失效的链接的答案中。 - Anders

0

问题似乎不在于Google这边,而是因为您试图从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.

运行 sudo apt-get update --allow-unauthenticated 返回完全相同的错误信息,我很抱歉!我没有更改任何配置等等。从GCE默认服务器设置中,我没有告诉apt通过http获取更新,这是默认行为。 - chapmanio
1
可能的问题是您的Ubuntu版本不再受支持(因为17.04不是LTS,9个月的支持期应该已经过去了)。为什么不尝试一个更新的版本呢? - heroin
2
尽管我没有尝试过,你可以尝试这里提出的解决方案:https://smyl.es/how-to-fix-ubuntudebian-apt-get-404-not-found-package-repository-errors-saucy-raring-quantal-oneiric-natty/ - heroin
1
我刚刚尝试了那个。它没有解决Zesty版本的问题。 - lathomas64
2
Zesty已经不再被支持了,就像Heroin建议的那样。遵循+Denis Trofinov的答案,你会找到解决方案的。我之前也遇到过同样的问题,这就是解决方法。按照他的sed脚本,将仓库更改为old-release.ubuntu.com即可。 - Anders
显示剩余2条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接