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:
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:
There's a lot of Debian and Ubuntu release names from
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
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:
and will attempt to find files named
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.
Nevertheless you could try these steps:
sudo rm -f oracle-virtualbox.list
sudo apt-get update
Hope it help =)