Virtualbox not launching on Ubuntu 18.04 - Qt lib problem

Thanks cmak.fr for pointing me towards the solution. I had to reinstall the the libqt5core5a and libdouble-conversion1 packages. Note that this also removed virtualbox-qt, which had to be reinstalled:

sudo apt-get remove libqt5core5a
sudo apt-get install libqt5core5a
sudo apt-get remove libdouble-conversion1
sudo apt-get install libdouble-conversion1
sudo apt-get install virtualbox-qt

At the end, one can check with ldd /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 to see if there are other missing dependencies. If there are, try finding the corresponding package names and reinstall them.


In my case (fresh Ubuntu 18.10 install) ldd showed that only libQt5Widgets.so.5 was missing, and running virtualbox would show something like this:

VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

So it was pretty close to OP's error. So I had to:

sudo apt install --reinstall libqt5widgets5

But then I had an error pretty similar to one of above in this thread:

Qt FATAL: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

After rising debug level with :

export QT_DEBUG_PLUGINS=1

It showed that I had to install another two missing dependencies:

sudo apt install --reinstall libqt5dbus5
sudo apt install --reinstall libxcb-xinerama0