http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease 的發布文件尚未生效

http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease 的發布文件尚未生效

我正在使用Ansible 從主伺服器在我的Slave1 伺服器上安裝Nginx 軟體包(注意- 主伺服器和從伺服器都具有Ubuntu 18.04,並且我在Docker 容器內運行這些軟體包),但每次我運行Ansible 命令來執行此操作時,低於錯誤。我被困在這裡,有什麼辦法可以解決這個問題。請幫我調試這個問題。

root@afb19093484e:/# ansible Slave1 -m apt -a "name=nginx state=present"


172.17.0.3 | FAILED! => {
    "changed": false, 
    "cmd": "apt-get update", 
    "msg": "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.\nE: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 3d 23h 23min 36s). Updates for this repository will not be applied.", 
    "rc": 100, 
    "stderr": "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.\nE: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 3d 23h 23min 36s). Updates for this repository will not be applied.\n", 
    "stderr_lines": [
        "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.", 
    ], 

答案1

確保系統時鐘設定為 UTC,並且與 UTC 的誤差在幾分鐘之內。

相關內容