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/我可以在不到一个小时前看到今天的更新。

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

4

4 回答 4

22

我确认“E:存储库‘ http://ru.archive.ubuntu.com/ubuntu zesty Release’不再有发布文件。”

按照海洛因之前在配方中提出的建议解决了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

不幸的是,如果您选择了国家镜像(例如更新),则此 sed 命令对您不起作用us.archive.ubuntu.com。然后可以更新文件 /etc/apt/sources.list 中的字符串,在文本编辑器中手动更改所有条目,例如http://*.archive.ubuntu.com和,http://*.security.ubuntu.comhttp://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
于 2018-01-24T15:44:06.167 回答
8

自 2018 年 1 月 13 日起,17.04 的生命周期已结束。您将需要迁移到更新的版本或使用长期稳定的版本: https ://wiki.ubuntu.com/Releases

于 2018-01-18T17:06:05.470 回答
1

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

我有同样的问题,解决方案在这个链接中,它对我有用......

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

希望我的回答会有所帮助。

于 2018-01-25T04:44:50.753 回答
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.
于 2018-01-18T15:29:21.630 回答