Results 1 to 8 of 8

Thread: Unable to sudo apt-get update keep getting Release file is not valid yet.

  1. #1
    Join Date
    2022-Nov
    Posts
    1

    Unable to sudo apt-get update keep getting Release file is not valid yet.

    I do not have much experience in linux but i am having issues with trying to update i keep getting this error


    ┌──(root㉿kali)-[/home/kali]
    └─# sudo apt-get update
    Get:1 http://kali.download/kali kali-rolling InRelease [30.6 kB]
    Reading package lists... Done
    E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 30min 11s). Updates for this repository will not be applied.

    I am running kali in a live usb stick and it happens on both of my computers.
    I have reinstalled kali multiple times on the usb and it happens even on a fresh install using the latest images available.

    I have googled the issue and it seems to have to do something with the computers time being wrong but i have checked and reset it multiple times in bios and os but i have found no solution. if i wait the specified time it will just reset. i have verified that i have internet access all of the solutions on the internet involving the time do not work for me.

    a web solution to install NTP service does not work because Sudo apt install (xyz) does not seem to work

    ──(root㉿kali)-[/home/kali]
    └─# sudo apt install ntp
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package ntp is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'ntp' has no installation candidate

    therefore i am stuck. it was working just 2 days ago

  2. #2
    Hi there, I was experiencing the exact same issue while running Kali off of a usb drive. I fixed the issue by setting the correct timezone and enabling NTP synchronization thru the terminal (selecting the correct timezone with the GUI didn't actually change anything). You don't need to have the ntp or ntpdate packages installed to do this.

    Here's the article I referenced: https://linuxconfig.org/how-to-set-time-on-kali-linux

    Essentially:

    1) $ timedatectl list-timezones -to find your timezone

    2) $ sudo timedatectl set-timezone Australia/Sydney -to set your timezone (replacing Australia/Sydney)

    3) $ timedatectl -verify your timezone has been changed, and notice clock synch is disabled Local time: Sat 2021-01-09 14:15:11 AEDT
    Universal time: Sat 2021-01-09 03:15:11 UTC
    RTC time: Fri 2021-01-08 09:46:05
    Time zone: Australia/Sydney (AEDT, +1100)
    System clock synchronized: no

    NTP service: n/a
    RTC in local TZ: no

    4) $ sudo timedatectl set-ntp on -turn on ntp sync

    After doing this, you should notice your local machine's time and timezone are now correct (mine was initially showing the correct time, but unchanged timezone) and should be able to do the apt update

    Cheers

  3. #3
    Join Date
    2022-Nov
    Location
    west texas
    Posts
    13
    I entered the url you posted over here

    https://downforeveryoneorjustme.com/...org?proto=http

    It told me kali .org is up and the problem is with me. That is what I use to check repos.

    As far as ntp. It was removed from Debian testing. Which Kali is based on.

    https://tracker.debian.org/pkg/ntp
    https://launchpad.net/debian/+source/ntp/+changelog
    Some times I take a crooked road to get my head straight.
    Not all who wander are lost.

  4. #4
    Join Date
    2017-Jul
    Location
    Pacific West Coast
    Posts
    2
    I am having the exact same problem with a fresh kali 2022.3 live usb install direct from the kali iso image file.

    ──(kali㉿kali)-[~]
    └─$ cat /etc/apt/sources.list
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    deb-src http://http.kali.org/kali kali-rolling main non-free contrib

    ┌──(kali㉿kali)-[~]
    └─$ sudo apt-get update
    Get:1 http://kali.download/kali kali-rolling InRelease [30.6 kB]
    Reading package lists... Done
    E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 2h 7min 56s). Updates for this repository will not be applied.


    I have tried a variety of fixes but nothing works.

  5. #5
    Join Date
    2017-Jul
    Location
    Pacific West Coast
    Posts
    2
    I saw your post elsewhere and tried that already. Didnt work.

    Update on my troubleshooting. I have reached this point----


    ┌──(kali㉿kali)-[/etc/apt]
    └─$ apt-get update
    Reading package lists... Done
    E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
    E: Unable to lock directory /var/lib/apt/lists/
    W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
    W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

    ┌──(kali㉿kali)-[/etc/apt]
    └─$ apt-get upgrade
    E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

    ┌──(kali㉿kali)-[/etc/apt]
    └─$ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    ┌──(kali㉿kali)-[/etc/apt]
    └─$ sudo apt-get update
    Get:1 http://kali.download/kali kali-rolling InRelease [30.6 kB]
    Reading package lists... Done
    E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 3h 44min 44s). Updates for this repository will not be applied.

  6. #6
    use this command in terminal

    timedatectl set-ntp on

    This should fix all problems with clock and apt/

  7. #7
    Join Date
    2023-Mar
    Posts
    1

    heres the solution you need

    Quote Originally Posted by riverratt View Post
    I am having the exact same problem with a fresh kali 2022.3 live usb install direct from the kali iso image file.

    ──(kali㉿kali)-[~]
    └─$ cat /etc/apt/sources.list
    deb http://http.kali.org/kali kali-rolling main non-free contrib
    deb-src http://http.kali.org/kali kali-rolling main non-free contrib

    ┌──(kali㉿kali)-[~]
    └─$ sudo apt-get update
    Get:1 http://kali.download/kali kali-rolling InRelease [30.6 kB]
    Reading package lists... Done
    E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 2h 7min 56s). Updates for this repository will not be applied.


    I have tried a variety of fixes but nothing works.






    answer:-simply copy and paste this without the quotes
    then edit the values to manually configure your date ""date --set="7 mar 2023 4:53:00""

  8. #8
    Join Date
    2023-Jul
    Posts
    1
    I have the simplest solution here. This is what you should do
    open settings and then date and time
    untick the option for automatic Date and time
    for time format select AM/PM
    for Timezone select based on where you are and lastly manually input the present correct time in your area.

    thats all

Similar Threads

  1. Release File Not Valid Yet
    By Zonark in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2021-01-21, 19:12
  2. Replies: 5
    Last Post: 2019-03-15, 20:42
  3. Replies: 0
    Last Post: 2014-01-06, 19:16
  4. Replies: 1
    Last Post: 2013-12-21, 09:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •