2

I am in Ubuntu 22.04 via WSL on Windows 11.

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

is returning :

## Installing the NodeSource Node.js 18.x repo...

Populating apt-get cache...

  • apt-get update

Hit:1 https://apt.releases.hashicorp.com jammy InRelease Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Hit:4 https://packages.redis.io/deb jammy InRelease Get:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB] Reading package lists... Done E: Release file for http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease is not valid yet (invalid for another 5h 27min 34s). Updates for this repository will not be applied. E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease is not valid yet (invalid for another 5h 27min 59s). Updates for this repository will not be applied. E: Release file for http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease is not valid yet (invalid for another 5h 28min 40s). Updates for this repository will not be applied. Error executing command, exiting

$ sudo head /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy_InRelease
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Origin: Ubuntu
Label: Ubuntu
Suite: jammy
Version: 22.04
Codename: jammy
Date: Thu, 21 Apr 2022 17:16:08 UTC
Architectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x

What am I to do ?

$date
Fri Feb 24 04:12:40 IST 2023
anjanesh
  • 623

1 Answers1

1

This looks like a clock or timezone issue, similar to this question.

Fri Feb 24 04:12:40 IST 2023

Google tells me that it is currently about 5 pm IST now. Given the time that you posted this (currently 5 hours ago), it should have been around noon your time?

At this point, the issue may have resolved itself (via a WSL<->Windows clock sync) already, but if not, for WSL, try:

  • Confirm that your Windows clock and timezone are correctly set
  • In Ubuntu, sudo hwclock -s
  • Try again

If that doesn't work:

  • From PowerShell, wsl --shutdown
  • Reboot the Windows host
  • Try again

Also see WSL2 Clock is out of sync with Windows on Stack Overflow for some historical information on this.

NotTheDr01ds
  • 17,888