无法更新或升级 Ubuntu。没有可用内容(没有新软件包,什么都没有)

无法更新或升级 Ubuntu。没有可用内容(没有新软件包,什么都没有)

我无法安装任何新软件包,甚至无法从 Ubuntu 18.04 升级。这就像虚拟机停留在 Ubuntu 18.04 刚刚发布的旧时代。没有可用的新软件包或任何东西。肯定出了什么问题,我不知道如何解决这个问题。

[root:7e2d33988106:/]# lsb_release -a                                                                                                                                                                                                                                   12:55PM/09.12
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

[root:7e2d33988106:/]# cat /etc/apt/sources.list | grep -v "#" | sort -u                                                                                                                                                                                                12:55PM/09.12

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security universe

[root:7e2d33988106:/]# apt update; apt upgrade -y; apt full-upgrade -y; apt dist-upgrade -y; apt autoremove -y; apt clean -y                                                                                                                                            12:55PM/09.12
Hit:1 https://deb.nodesource.com/node_6.x bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                       
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                           
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]       
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]     
Reading package lists... Done       
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 17h 54min 25s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 17h 55min 3s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 17h 55min 58s). Updates for this repository will not be applied.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

知道为什么没有新的软件包可用吗?我已经好几个月没有升级这个 docker 容器了。

答案1

检查并更正您的系统时钟(或您的时区,因为两者都可能有误)。

系统时钟最好设置为 UTC,并通过时区完成本地时间校正(即由系统转换为本地时间;默认为互联网或 UTC 时间)。

用于timedatectl查看该数据。

如果您的时钟严重错误,系统将不会触及任何可用的升级,因为不正确的时间可能意味着它们[更新]已被篡改(因此会被忽略并出现警告/错误)。

更多详细信息:https://help.ubuntu.com/lts/serverguide/NTP.html

相关内容