"Failed to start LSB: VirtualBox Linux kernel module" [duplicate]

Ubuntu-server 17.04 x64, Cinammon 3.2.7, Kernel 4.13.3 generic.

Attempting to set up VirtualBox, though so far I have been unable to start any virtual machine. Upon installation (apt install virtualbox), I get the following lines near the end of the installation process:

● virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-09-21 19:57:07 +04; 18ms ago
Docs: man:systemd-sysv-generator(8)
Process: 463 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
CPU: 28ms

Sep 21 19:57:06 Hiigaran systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Sep 21 19:57:06 Hiigaran virtualbox[463]:  * Loading VirtualBox kernel modules...
Sep 21 19:57:07 Hiigaran virtualbox[463]:  * No suitable module for running kernel found
Sep 21 19:57:07 Hiigaran virtualbox[463]:    ...fail!
Sep 21 19:57:07 Hiigaran systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Sep 21 19:57:07 Hiigaran systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Sep 21 19:57:07 Hiigaran systemd[1]: virtualbox.service: Unit entered failed state.
Sep 21 19:57:07 Hiigaran systemd[1]: virtualbox.service: Failed with result 'exit-code'.

Tried following the top answer in this question, by removing virtualbox-dkms and installing it again. This resulted in the same lines as above.

Attempting to start a virtual macine, I get an error giving the following details:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. 

The modprobe command results in:

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.13.3-041303-generic

Solution 1:

Solution seems to be to not install the virtualbox package that comes with Ubuntu. Following the steps to add a 3rd party repository as shown here, then installing the virtualbox-5.1 package appears to get things working with no further actions required.