0

i'm using kali and i'm trying the command apt-get update, but i got the following errors

root@kali:~# apt-get update
Hit:1 https://kali.download/kali kali-rolling InRelease               
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.2.57.20 80]
Reading package lists... Done
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.

what does it mean?

marked as duplicate by RalfFriedl, Jeff Schaller, roaima, Rui F Ribeiro, Sparhawk Feb 18 at 23:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Are you familiar with Linux systems generally, and in particular how repositories work in Debian, Ubuntu, or Mint? – roaima Feb 18 at 20:42
  • n/a might be from lsb_release on kali and some script wrote the config blindly – A.B Feb 18 at 20:47
  • @Ralf, if there's an actual answer, let's provide the actual answer (unix.meta.stackexchange.com/questions/4657/…) – Jeff Schaller Feb 18 at 20:58
  • 1
    i mean yes, i understand the function of repositories, what i dont understand is the errors that i get – Jerome Feb 18 at 20:59
  • 2
    @Jerome some people here are trying to help you. Your question is a possible duplicate of another one that asks for (and gets) the correct settings for the sources.list file you need to fix. The reason Ralf suggested the "Why is Kali..." duplicate is because you didn't show any evidence of being a competent user with the way you phrased your question, and too many beginners start with Kali and wonder why they get stuck. – roaima Feb 18 at 21:13
4

You've tried to install Oracle VirtualBox in Kali, but Oracle does not provide a VirtualBox update repository for Kali, since they don't support Kali. As a result, VirtualBox's installation script placed n/a in place of the release name.

Debian repository specifications have three parts: first is the base URL of the repository. The second is the name of the release whose packages should be searched for. Anything after that will be the names of the repository sections that should be used, if there are any; there may be zero or more of them.

You can use a web browser to take a peek into Oracle's VirtualBox repository. Here is the base URL:

http://download.virtualbox.org/virtualbox/debian

Below the base URL level, there is the pool directory, which is split into sub-directories according to the package names' initial characters. There is also the dists directory, that includes the index files that will tell which packages will belong to each release. The release name will be a sub-directory in the dists directory. So, let's look in there:

http://download.virtualbox.org/virtualbox/debian/dists

There's a lot of Debian and Ubuntu release names from artful to zesty, but no kali-rolling in sight, nor anything kali* for that matter. At this point we know for sure that Oracle does not publish any version of VirtualBox for kali.

When n/a is written into the repository specification in place of the release name, the apt-get tool will actually attempt to access this URL:

http://download.virtualbox.org/virtualbox/debian/dists/n/a/

and will attempt to find files named InRelease and/or Release in there. But the entire directory does not exist.

You should check your /etc/apt/sources.list file: it defines the repositories apt-get will try to access. If the VirtualBox repository is mentioned in there, comment it out, as you now know that the repository specification is not correct. If it's not there, check all the files in the /etc/apt/sources.list.d/ directory too: some packages can drop add-on repository specification files into this directory.

And now you know that whatever document you followed to install VirtualBox into Kali actually gave you an incomplete result: a VirtualBox installation that cannot be updated using standard tools, and in fact causes errors when you're trying to update the rest of the system. Instead of being an advanced penetration test specialist, you will soon be a vulnerable user whose system is not up-to-date with patches.

If you understand what you are doing when installing VirtualBox on Kali, you should now know how to fix the repository URL to pick a VirtualBox release that matches what you actually installed onto your Kali (i.e. the version intended for the Debian/Ubuntu release that was used as groundwork for your version of Kali).

But Kali is designed for penetration testing. That means it is not intended as a long-term everyday OS: it's designed to run from USB, but you can install it on your pentesting tool laptop if you need to.

When a penetration test for a particular company is complete, you generally wipe the tool laptops' disks and USB sticks to the company's satisfaction, or you might even turn them over to the company you did the test for, to prove that you aren't taking any of the company's data with you when you leave. Then you prepare your tools again for the next test assignment.

In a word, Kali is designed to be task-oriented and disposable. The design longevity of a particular Kali installation is a few weeks or months at most. The distribution is not designed with long-term stability in mind. It may work just fine for a while... until some day it runs into some problem, possibly because of a particular combination of updates.

This is why trying to use Kali as an everyday general-purpose operating system tends to get professionals irritable. If you are a really knowledgeable in all aspects of Linux, you might choose to do it anyway and solve any problems you encounter as you go, but don't say we didn't warn you.

  • thanks for that, and yes i was trying to install virtualbox in kali as part of something that i have in mind but i don't have enough experience with this distribution. I have been understanding a lot of things that you mentioned in your answer and because of it now i have them clear. i solved some problems but then i got a few more and i'm getting stressed, i will try my best in this and again thanks for your answer it helped me a lot. BY the way sorry if you any mistake english is not my main l language – Jerome Feb 18 at 23:10
  • No problem, English is not my first language either, but I try my best... – telcoM Feb 19 at 0:32
  • hi again, you are the only one that i can ask to, because i couldn't find anything in google i modified my sources.list and removed the virtualbox repository, but when i try use apt-get update i keep getting the same 3 lines as i posted before i removed all the files installed by virtualbox, so i don't know why is it trying to connect to that repository. could yu help me? @telcoM – Jerome Feb 24 at 3:37
  • Well, the first thing to do would be to double-check whether you missed something or maybe VirtualBox is putting the setting back in. Please run grep -r download.virtualbox.com /etc to find out if that string still exists in some configuration file. – telcoM Feb 24 at 5:46

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