Roots Discourse

Vagrant provision: Failed to update apt cache

Happy new year everyone!

Ran into a problem in development env while executing vagrant provision on an excisting VM.

TASK [common : Update apt packages] ********************************************
System info:
  Ansible 2.8.5; Vagrant 2.2.6; Linux
  Trellis 1.2.0: October 11th, 2019
---------------------------------------------------
Failed to update apt cache: E:Release file for
http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not
valid yet (invalid for another 3d 3h 39min 21s). 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 3d 3h 40min 11s). 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 3d 3h 41min
23s). Updates for this repository will not be applied.
fatal: [default]: FAILED! => {"changed": false}
 [WARNING]: Could not find aptitude. Using apt-get instead

Tried some Googleing but couldn’t figure it out. Any ideas?

1 Like

Did you see https://ahelpme.com/linux/ubuntu/ubuntu-apt-inrelease-is-not-valid-yet-invalid-for-another-151d-18h-5min-59s/?

I’d check the date and time on your Vagrant VM and make sure it’s correct.

1 Like

Unfortunately I didn’t. This solved the issue for me, thank’s alot @swalkinshaw!