LoginSignup
0
0

More than 1 year has passed since last update.

WSL2でのapt updateでエラーを吐いた

Posted at

はじめに

WSL2を使用しているときに新しくアプリケーションのインストールをしようとして何も考えずにsudo apt updateを叩くとエラーを吐かれた。

エラー文

E: Release file for http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease is not valid yet (invalid for another 1h 51min 43s). 
Updates for this repository will not be applied.    

解決方法

yetとか出てたので日付関連だろうとあたりを付けて調べてみると時間がずれている場合があるらしいと発見。
dateコマンドで時刻を見てみると時間がずれていたので

$ sudo hwclock --hctosys

で時間を合わせる
この後にsudo apt updateするとエラーを吐かなくなった

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0