问题
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 11d 10min 50s). Updates for this repository will not be applied
1.遇到这个问题主要是时间没有更新导致的,首先我们要查看当前时区
root@bf8fc620bea2:/# date -R
Thu, 10 Mar 2022 02:38:36 +0800
// 很显然这不是东八区的时间,下面我们就需要修改时区
2.使用tzselect命令修改时区
3.查看是不是更改为东八区
[root@localhost bin]# date -R
Thu, 10 Mar 2022 11:25:57 +0800
4.设置系统时间为此刻的北京时间
// 设置时间为此刻北京时间
[root@localhost bin]# date -s "2022-03-10 11:29:46"
2022年 03月 10日 星期四 11:29:46 CST
// 查看时间
[root@localhost bin]# date
2022年 03月 10日 星期四 11:29:50 CST
5.再次执行apt-get update命令就可以成功了
root@bf8fc620bea2:/# apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Reading package lists... Done