溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

怎么修復Ubuntu Linux中的 “Release file is not valid yet” 錯誤問題

發(fā)布時間:2021-10-22 09:48:56 來源:億速云 閱讀:139 作者:小新 欄目:系統(tǒng)運維

這篇文章將為大家詳細講解有關怎么修復Ubuntu Linux中的 “Release file is not valid yet” 錯誤問題,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

我最近在我的樹莓派上安裝了 Ubuntu 服務器。我在 Ubuntu 終端連接上了 Wi-Fi,然后做了我在安裝任何 Linux 系統(tǒng)后都會做的事情,那就是更新系統(tǒng)。

當我使用 sudo apt update 命令時,它給了一個對我而言特別的錯誤。它報出倉庫的發(fā)布文件在某個時間段內(nèi)無效。

E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease is not valid yet (invalid for another 159d 15h 20min 52s). Updates for this repository will not be applied.**

下面是完整輸出:

ubuntu@ubuntu:~$ sudo apt updateHit: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... DoneE: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease is not valid yet (invalid for another 21d 23h 17min 25s). Updates for this repository will not be applied.E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/InRelease is not valid yet (invalid for another 159d 15h 21min 2s). Updates for this repository will not be applied.E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-backports/InRelease is not valid yet (invalid for another 159d 15h 21min 32s). Updates for this repository will not be applied.E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease is not valid yet (invalid for another 159d 15h 20min 52s). Updates for this repository will not be applied.

修復 Ubuntu 和其他 Linux 發(fā)行版中 “Release file is not valid yet” 的錯誤。

錯誤的原因是系統(tǒng)上的時間和現(xiàn)實世界的時間不同。

你看,每個倉庫文件都是在某個日期簽名的,你可以通過查看發(fā)布文件信息了解:

sudo head /var/lib/apt/lists/ports.ubuntu.com_ubuntu_dists_focal_InRelease-----BEGIN PGP SIGNED MESSAGE-----Hash: SHA512 Origin: UbuntuLabel: UbuntuSuite: focalVersion: 20.04Codename: focalDate: Thu, 23 Apr 2020 17:33:17 UTCArchitectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x

現(xiàn)在,由于某些原因,我的 Ubuntu 服務器上的時間是過去時間,這也是為什么 Ubuntu 報出發(fā)布文件已經(jīng)無效 X 天的原因。

如果你連接到了互聯(lián)網(wǎng),你可以等待幾分鐘讓系統(tǒng)同步時間。

如果不行,你可以強制系統(tǒng)使用本地時間作為實時時鐘(硬件時鐘):

sudo timedatectl set-local-rtc 1

timedatectl 命令可以讓你在 Linux 上配置時間、日期和更改時區(qū)。

你應該不需要重新啟動。它可以立即工作,你可以通過更新你的 Ubuntu 系統(tǒng)再次驗證它。

如果問題解決了,你可以將實時時鐘設置為使用 UTC(Ubuntu 推薦的)。

sudo timedatectl set-local-rtc 0

關于“怎么修復Ubuntu Linux中的 “Release file is not valid yet” 錯誤問題”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI