I just finished installing Debian-9 Stretch:
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
After installing VirtualBox 5.1.22 r115126(Qt5.7.1), I created a virtual machine and when it was time to install the OS, I got the error below:
The above could be because Kernel drivers for VirtualBox have not been compiled. Here are the commands to resolve the above issue:
1) sudo apt-get update - I did this much earlier.
2) Install kernekl headers and build tools
- sudo apt-get install build-essential module-assistant
- sudo m-a prepare
3) Compile the virtualbox kernel driver:
command: sudo /sbin/rcvboxdrv setup
All went well in a couple of lines. I shut down and relaunched VirtualBox and all went well.