Ubuntu – Cannot run virtualbox on ubuntu 16.04

virtualbox

I tried to install virtualbox for the first time on my ubuntu 16.04 machine following the instructions here. When tried to run from terminal with command virtualbox it gave me the error below:

VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen("/usr/lib/virtualbox/VBoxRT.so",) failed: <NULL>

VirtualBox: Tip! It may help to reinstall VirtualBox.

and when tried to run by searching virtualbox an icon appeared in sidebar and after some seconds disappeared.

I tried downloading the official deb file form the virtualbox website and install with sudo apt install ./virtual... but the same error happened.

I also completely removed virtualbox with --purge option and its user and group every time I tried to reinstall.

The interesting part is that it was easy to install the Virtualbox on an ubuntu 16.04 hosted by another virtualbox on a windows machine.

Any answer or comment would be appreciated.

Edit (Solved)
Thanks to Charles the problem solved by changing the owner and group of /usr and /usr/lib to root by the following commands:

sudo chown root:root /usr
sudo chown root:root /usr/lib

My problem was that I only changed the owner by sudo chown root /usr.

Best Answer

As mentioned at VirtualBox Forums the owner and group of /usr and / or /usr/lib may have been incorrectly set.

Check the two directories with ls -ld /usr && ls -ld /usr/lib - both the user and group of the directories should be root. If not, they can be set with:

sudo chown root:root /usr /usr/lib