ubuntu@ubuntu:~$ sudo apt update Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [111 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB] Reading package lists... Done E: Release filefor http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease is not valid yet (invalid for another 21d 23h 17min25s). Updates for this repository will not be applied. E: Release filefor http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/InRelease is not valid yet (invalid for another 159d 15h 21min2s). Updates for this repository will not be applied. E: Release filefor http://ports.ubuntu.com/ubuntu-ports/dists/focal-backports/InRelease is not valid yet (invalid for another 159d 15h 21min32s). Updates for this repository will not be applied. E: Release filefor http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease is not valid yet (invalid for another 159d 15h 20min52s). Updates for this repository will not be applied.
修复 Ubuntu 和其他 Linux 发行版中 “Release file is not valid yet” 的错误。
错误的原因是系统上的时间和现实世界的时间不同。
你看,每个仓库文件都是在某个日期签名的,你可以通过查看发布文件信息了解:
1 2 3 4 5 6 7 8 9 10 11 12
sudo head /var/lib/apt/lists/ports.ubuntu.com_ubuntu_dists_focal_InRelease -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512