"Repository is not valid yet"问题解决方案

root@h3c-i-43:~# apt update
Get:1 http://10.1.89.230:89/ubuntu bionic InRelease [242 kB]
Get:2 http://10.1.89.230:89/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://10.1.89.230:89/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://10.1.89.230:89/ubuntu bionic-security InRelease [88.7 kB]
Reading package lists... Done
E: Release file for http://10.1.89.230:89/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 88d 6h 14min 45s). Updates for this repository will not be applied.
E: Release file for http://10.1.89.230:89/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 1169d 19h 55min 46s). Updates for this repository will not be applied.
E: Release file for http://10.1.89.230:89/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 1169d 19h 56min 56s). Updates for this repository will not be applied.
E: Release file for http://10.1.89.230:89/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 1169d 19h 54min 52s). Updates for this repository will not be applied.

该问题主要由于系统时间偏差太大导致,只要设置好正确的时间就能修复此问题.

root@h3c-i-37:~# head /var/lib/apt/lists/10.1.89.230\:89_ubuntu_dists_bionic-backports_InRelease 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Origin: Ubuntu
Label: Ubuntu
Suite: bionic-backports
Version: 18.04
Codename: bionic
Date: Mon, 12 Apr 2021 13:19:59 UTC
Architectures: amd64 arm64 armhf i386 ppc64el s390x

同步时间 [ntpdate,chrony,date]

  • 临时同步
    date -s "2021-04-13"
# 安装ntpdate
apt update
apt install ntpdate
ntpdate ntp1.aliyun.com
posted @ 2021-04-13 03:09  lvusyy  阅读(472)  评论(0编辑  收藏  举报