The automatic installer for the VirtualBox Guest Additions doesn’t work in Kali Linux 2018.2 (Or any other version of Kali) when using VirtualBox 5. The system will show an error:Oops! There was a problem running this software. Unable to locate program.

The solution is to run the installer from the terminal.

  1. First, run the the command apt-get install linux-headers-amd64
  2. Mount the installer from VirtualBox and then run the following command from the terminal

If you are running as root:
sh /media/cdrom/
If you are running as a regular user:
sudo sh /media/cdrom/