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

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

我正在使用 Ansible 从主服务器将 Nginx 软件包安装到我的从属 1 服务器上(注意 - 主服务器和从属服务器都安装了 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 的误差在几分钟之内。

相关内容