1

I cannot install any new packages or even upgrade from Ubuntu 18.04. It's like the VM is stuck in the older days where Ubuntu 18.04 just came out. There are no new packages available or anything. Something is definitely screwed up and I'm not sure how to fix this.

[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.

Any idea why no new packages are available? I haven't upgraded this docker container in months.

  • 2
    Check your system clock (it's most likely wrong), if it's not your timezone is set incorrectly... – guiverc Sep 13 '19 at 12:40
  • Thanks for the suggestion @guiverc. The clock is set to Thu Sep 12 13:19:23 CDT 2019 which is relatively current (just off by a few hours). – user3447014 Sep 13 '19 at 12:58
  • 2
    The system clock should be ideally be set to UTC, corrections done via timezone (ie. that allows for conversion to local time for non-internet time stamping). Check your timedatectl and ensure it's accurate; if off by hours you won't be able to update (it'll ignore updates as suspicious/tampered with) – guiverc Sep 13 '19 at 13:05
  • Wow. I never knew that. I synced it to an ntp server and all is well now. Thanks so much! – user3447014 Sep 13 '19 at 13:28
  • 2
    Possible duplicate of sudo apt update error: "Release file is not yet valid" – karel Nov 26 '19 at 16:16
6

Check and correct your system clock (or your timezone as both could be wrong).

System clock should ideally be set to UTC, and local time-correcting done via timezone (ie. conversion to local time done by the system; with internet or UTC time the default).

Use timedatectl to view this data.

If your clock is badly wrong, the system will not touch any upgrades available, as the incorrect time could mean they [updates] have been tampered with (and are thus ignored with warnings/errors as you got).

For more detail: https://help.ubuntu.com/lts/serverguide/NTP.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.