0

When i try to update my kali using apt-get update, the flowing error is displayed:

Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Ign:2 http://download.virtualbox.org/virtualbox/debian n/a InRelease
Err:3 http://download.virtualbox.org/virtualbox/debian n/a Release
  404  Not Found [IP: 23.50.202.112 80]
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 43min 17s). Updates for this repository will not be applied.
E: The repository 'http://download.virtualbox.org/virtualbox/debian n/a Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I am using kali as a main system beside windows

  • 2
    My conjectures: I see two probable issues: 1/ wrong time on system (local time / utc time / timezone mismatch), /2 an automatic script to add a virtualbox repository was used, intended for debian but ran on kali which is unsupported, hence n/a which is wrong (this probably comes from lsb_release -a). Actually the main issue is probably running kali linux at all heh. – A.B Nov 21 '19 at 7:09
  • @a.b Agreed on both counts. – Shadur Nov 21 '19 at 8:18
2

You have multiple problems, and most of them stem from the fact that you're obviously fairly new to linux and aren't quite aware what you're doing.

The first problem is that, frankly, Kali is not, never was and will never be intended as a system for general desktop use. It's specifically geared towards pentesting. While it's of course possible to use it for whatever you want to, it's a bit like using a Swiss army folding pocket knife at dinner when proper cutlery is available -- sure, it'll work, but it's awkward, and everyone else at the table keeps giving you odd looks.

Of course, the obvious solution there of installing a 'proper' distribution is probably not the help you're looking for, but keep it in mind.

The second, more acute problem, is that at some point you followed the instructions on a website to add http://download.virtualbox.org/virtualbox/debian to your /etc/apt/sources.list in order to get (I'm admittedly making an educated guess here, but I don't think I'm wrong) the latest version of VirtualBox, which you were informed you needed for something you wanted.

The problem there is that, as the wording in the URL already indicates, that repository is geared towards compatibility with Debian, meaning the actual distribution, rather than the heavily modified derivative that Kali Linux is. This brings with it any number of risks of compatibility breaks, which an experienced Linux user/administrator would be able to sort their way through with relatively little difficulty -- and you've just run into one of them.

With that out of the way, let's address the specific errors you were getting:

E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 3h 43min 17s). Updates for this repository will not be applied.

In the apt package management structure, each repository contains a 'Release' file that lists all available packages, their various interdependencies, and when they were added/updated, so that your package manager can parse it in order to know what to update for you. In this case, several of the timestamps in that file were later than the time that your computer thinks it is. Since the internet does not provide for a prognostication protocol, it can only assume that there's something wrong with the file headers -- and if there's one thing wrong with the file, there might be other things wrong with it as well, and because this is a critically important part of your distribution's infrastructure it takes no chances and refuses to parse it.

The two most likely causes are 1) you downloaded a Release file that was only just uploaded and that caused a discrepancy, in which case just redownloading it will likely fix it; or 2) your system clock - or at least the way Kali interprets what your system clock thinks the time is - is very badly off. There are software packages that will automatically keep your local clock in sync with what the rest of the world what time it is; I recommend chrony personally, but plain old ntp will do the trick.

E: The repository 'http://download.virtualbox.org/virtualbox/debian n/a Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Again, exactly what it says on the tin. Recent changes to the way Debian handles packages repositories mean that some things have changed in the way repositories offer their wares. The details are somewhat technical, security related and well beyond the scope of this discussion right now, but what it boils down to in terms of solutions is that you might be able to fix this by installing the apt-transport-https package and changing the 'http' part of the URL of this repository in /etc/apt/sources.list to 'https'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.