2

I am using Ubuntu 19.04 version. And when I want to install any software, I always use sudo apt-get update.

But it is failing every time. I am new in this field. Because of that error I can not install GNU Emacs.

It is showing:

$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/kelleyk/emacs/ubuntu disco InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Reading package lists... Done                                        
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 40min 7s). Updates for this repository will not be applied.
Melebius
  • 11,431
  • 9
  • 52
  • 78
Siraj
  • 31
  • 6
    Your clock seems to be in the past. Fix it manually, then retry. – Piskvor left the building Nov 18 '19 at 13:07
  • 1
    what @Piskvor said. sudo timedatectl set-ntp off && sudo timedatectl set-ntp on to force update of time. Had lots of issues with this when dual booting as windows kept updating time differently from ubuntu. :) – Smurfz87 Nov 18 '19 at 13:16
  • 1
    @Smurfz87: Windows sets HW clock to local time, Linux sets it to UTC. Note that NTP has a maximum error whence it won't update (some days, IIRC). https://askubuntu.com/a/349786/1319 – Piskvor left the building Nov 18 '19 at 13:18
  • Oh, also important to note is that for timedatectl to do it's magic you need to be connected to the internet AND the IP/port the service uses cannot be blocked. As my workplace was so kind to do, then wondering why the IoT devices using the ntp server to check time (no RTC) stopped functioning... – Smurfz87 Nov 18 '19 at 13:35
  • 3
    Are you sure you are using 19.04? Your APT links point to bionic which is 18.04. And if you are dual-booting as @Piskvor suggested, you might want to check Clock time is off on dual boot. – Melebius Nov 18 '19 at 13:49
  • 1
    Thanks a lot. It worked. – Siraj Nov 19 '19 at 03:34

0 Answers0