@Dennys - Have you tried the same on a Ubuntu 15.x Droplet? Ubuntu, from reading the VirtualBox docs, should have the correct version of the
linux-headers installed by default, though it's possible that an older release (even LTS, or a Long Term Support release) simply does not. You can run the command below to search for
linux-headers and use
apt-get install to install them.
sudo apt-cache search linux-headers --names-only
What this command does is isolate or narrow down the search by requesting that
apt-get only return results with
linux-headers (instead of the default, which is to return basically any package associated).
The results of the above command should look something like:
linux-headers-4.2.0-16 - Header files related to Linux kernel version 4.2.0
linux-headers-4.2.0-16-generic - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
linux-headers-4.2.0-16-lowlatency - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
linux-headers-generic - Generic Linux kernel headers
linux-headers-lowlatency - lowlatency Linux kernel headers
linux-headers-virtual - Transitional package.
linux-headers-3.4.0-4-goldfish - Linux kernel headers for version 3.4.0 on Android touch emulation
linux-headers-goldfish - Linux kernel headers for the goldfish kernel.
linux-headers-4.2.0-17 - Header files related to Linux kernel version 4.2.0
linux-headers-4.2.0-17-generic - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
linux-headers-4.2.0-17-lowlatency - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
linux-headers-4.2.0-18 - Header files related to Linux kernel version 4.2.0
linux-headers-4.2.0-18-generic - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
linux-headers-4.2.0-18-lowlatency - Linux kernel headers for version 4.2.0 on 64 bit x86 SMP
You'll also want to make sure that your build environment is properly setup. To do this, run the following command:
sudo apt-get install autoconf automake bc bison build-essential flex gcc g++ make python -y
This will automatically install the above packages and their dependencies. Then you can run the install command for the
linux-headers followed by the install command for
Essentially, the error is telling you that you're not currently setup to build external kernel modules.
The only issue you may encounter is that DigitalOcean does not allow for custom kernel configuration. You can choose a new kernel from within the control panel by clicking on your Droplet followed by the Settings link in the sidebar and finally the Kernel tab, though you're currently limited to those options.
For that reason, I would recommend deploying a Ubuntu 15.x Droplet over an LTS release as VB is one piece of software that is rapidly developed, thus changes are frequent and may not be as compatible with an older release and/or kernel.