I installed virtualbox on my kali linux operating system, but when i opened virtualbox i got the following;


The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-amd64.

You will not be able to start VMs until this problem is fixed.
root@kali:~#



I have searched for and tried different answers on google.

When I tried this particular one;

sudo apt-get install build-essential dkms sudo apt-get remove --purge virtualbox-dkms
sudo apt-get install virtualbox-dkms

Virtualbox started without any problem, however, it installed a 32-bit virtualbox for me while my computer is 64-bit.
Hence, I can't install kali amd64 on the 32-bit virtualbox.
I would really appreciate getting a solution here.