Unable to install VirtualBox Guest Additions

If you’re unable to install the VirtualBox Guest Additions and get various errors while executing the .sh script, it might help to install some packages that are missing.

Go to a root terminal and enter this:
apt-get install dkms binutils gcc make patch glibc-headers

Now try again and see if it works now.