sudo update、sudo upgradeでコケたときは、時刻を疑ってみる。

sudo apt update

をやったのですが、

E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/jammy-updates/InRelease is not valid yet (invalid for another 8時間 53分 33秒). Updates for this repository will not be applied.

E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/jammy-security/InRelease is not valid yet (invalid for another 9時間 9分 22秒). Updates for this repository will not be applied.

などと言われてしまいました。

で、しらべてみたら、

  1. システム時刻を確認する: 時々、システムの時刻が間違っている場合にもこのエラーが発生することがあります。システムの時刻が正しいことを確認してください

てなことをいわれたので、以下の処理で対応しました。

sudo timedatectl set-timezone Asia/Tokyo

sudo apt install ntp

とりあえず、今回は、これで上手く対応できたようです。

2024,江端さんの技術メモ

Posted by ebata