PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
No Result
View All Result
Home Linux

How to Fix “Repository is not valid yet” Error in Ubuntu

September 17, 2020
in Linux
283 9
How to Fix “Repository is not valid yet” Error in Ubuntu


I recently installed Ubuntu server on my Raspberry Pi. I connected it to the Wi-Fi from Ubuntu terminal and went about doing what I do after installing any Linux system which is to update the system.

When I used the ‘sudo apt update’ command, it gave me an error which was kind of unique to me. It complained that release file for the repository was invalid for a certain time period.

E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease is not valid yet (invalid for another 159d 15h 20min 52s). Updates for this repository will not be applied.

Here’s the complete output:

[email protected]:~$ sudo apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [111 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Reading package lists… Done
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease is not valid yet (invalid for another 21d 23h 17min 25s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/InRelease is not valid yet (invalid for another 159d 15h 21min 2s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-backports/InRelease is not valid yet (invalid for another 159d 15h 21min 32s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease is not valid yet (invalid for another 159d 15h 20min 52s). Updates for this repository will not be applied.

Fixing “release file is not valid yet” error in Ubuntu and other Linux distributions

The reason for the error is the difference in the time on the system and the time in real world.

You see, every repository file is signed on some date and you can see this information by viewing the release file:

sudo head /var/lib/apt/lists/ports.ubuntu.com_ubuntu_dists_focal_InRelease
—–BEGIN PGP SIGNED MESSAGE—–
Hash: SHA512

Origin: Ubuntu
Label: Ubuntu
Suite: focal
Version: 20.04
Codename: focal
Date: Thu, 23 Apr 2020 17:33:17 UTC
Architectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x

Now, for some reasons, the time on my Ubuntu server was in the past and this is why Ubuntu complained that the release file is not valid yet for X many days.

If you are connected to the internet, you may wait a few minutes for your system to synchronize the time.

If it doesn’t work, you may force the system to use local time as real time clock (hardware clock):

sudo timedatectl set-local-rtc 1

The timedatectl command enables you to configure time, date and change timezone on Linux.

You shouldn’t need to restart. It works immediately and you can verify it by updating your Ubuntu system again.

If the problem is solved, you may set the real time clock to use UTC (as recommended by Ubuntu).

sudo timedatectl set-local-rtc 0

Did it fix the issue for you?

I hope this quick tip helped you to fix this error. If you are still facing the issue, let me know in the comment section and I’ll try to help you out.

Like what you read? Please share it with others.



Source link

Share219Tweet137Share55Pin49

Related Posts

How to Delete Partitions in Linux [Using fdisk and GParted]
Linux

How to Delete Partitions in Linux [Using fdisk and GParted]

Managing partitions is serious business, especially when you have to remove them. I find myself doing this frequently, especially...

April 20, 2021
Blanket: Ambient Noise App With Variety of Sounds to Stay Focused
Linux

Blanket: Ambient Noise App With Variety of Sounds to Stay Focused

Brief: An open-source ambient noise player offering a variety of sounds to help you focus or fall asleep.With the...

April 19, 2021
How to Deploy Seafile Server with Docker
Linux

How to Deploy Seafile Server with Docker

First off, what is Seafile? Seafile is a self-hosted file synchronization program that works with the server-client model, as...

April 18, 2021
Systemd-Free Arch With Linux-libre Kernel
Linux

Systemd-Free Arch With Linux-libre Kernel

In the last month of 2019, the Hyperbola project took a major decision of ditching Linux in favor of...

April 17, 2021
Next Post
Changing Emoji Skin Tones Programmatically

Changing Emoji Skin Tones Programmatically

Streaming data from Amazon S3 to Amazon Kinesis Data Streams using AWS DMS : idk.dev

Streaming data from Amazon S3 to Amazon Kinesis Data Streams using AWS DMS : idk.dev

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

ESPlot: Open Source Software for Plotting Real-Time, High-Speed Signals For Embedded Systems

ESPlot: Open Source Software for Plotting Real-Time, High-Speed Signals For Embedded Systems

February 22, 2021
Community Resources, Weekly Newsletter, And Boosting Skills Online — Smashing Magazine

SVG Generators — Smashing Magazine

March 29, 2021
Understanding Plugin Development In Gatsby — Smashing Magazine

Understanding Plugin Development In Gatsby — Smashing Magazine

July 6, 2020
New – Create Amazon RDS DB Instances on AWS Outposts : idk.dev

New – Create Amazon RDS DB Instances on AWS Outposts : idk.dev

July 6, 2020

Categories

  • AWS
  • Big Data
  • Database
  • DevOps
  • IoT
  • Linux
  • Web Dev
No Result
View All Result
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In