I tried installing Virtualbox in Ubuntu 16.04 with the command sudo apt install virtualbox-5.1 but it gives the following error.
$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.4.0-171-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen("/usr/lib/virtualbox/VBoxRT.so",) failed: <NULL>
VirtualBox: Tip! It may help to reinstall VirtualBox.
I tried solving the error from multiple sites but still no avail.