0

I've seen two questions which are similar to mine, but neither has solutions that work for me. When I try to install VirtualBox from the Ubuntu repos, the resulting program gives the error:

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

I have qt5 core installed. In fact, because I kept getting Qt5 errors, I ended up doing

sudo apt install qt*

which did not solve my problem. I have even tried building VirtualBox from source, following these instructions. When I first started trying to build from source, I also got Qt5 errors in the ./configure step. I ended up installing Qt5 from their website and pointing the build at it, like this:

./configure --disable-hardening --with-qt-dr=/opt/path/to/Qt

That actually did fix the Qt error, but now the kmk step ends up failing, and then if I continue with the instructions I never actually get a working build.

I've also tried straight up reinstalling Ubuntu 3 or 4 times now, and that hasn't helped. This is one of the other questions here on Ask Ubuntu where the solution hasn't really helped me, because my system outputs -- as far as I can tell -- the same things as the only answer's working system. The other question has no answers, and the only commented suggestion is sudo apt install -f which I have obviously tried, and which did not fix my installation.

Requested Edits: I tried sudo apt install --reinstall libqt5core5a and kept getting the same error. Output of apt-cache policy virtualbox-qt libqt5core5a:

virtualbox-qt:
Installed: 5.2.10-dfsg-6
Candidate: 5.2.10-dfsg-6
Version table:
*** 5.2.10-dfsg-6 500
    500 http://us.archive.ubuntu.com/ubuntu bionic/multiverse amd64                   Packages
    100 /var/lib/dpkg/status
libqt5core5a:
Installed: 5.9.5+dfsg-0ubuntu1
Candidate: 5.9.5+dfsg-0ubuntu1
Version table:
*** 5.9.5+dfsg-0ubuntu1 500
    500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
    100 /var/lib/dpkg/status

I also have tried installing VirtualBox directly from the oracle website. The installation behaves as if it's working, but then throws the same error.

Output of file /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5:

/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: symbolic link to libQt5Core.so.5.9.5

Output of ldd /usr/lib/virtualbox/VirtualBox.so | sort:

/lib64/ld-linux-x86-64.so.2 (0x00007f7ff093a000)
libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f7fe3f24000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7fe9c5e000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f7fe52ea000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f7fea9e1000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f7febb26000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7fec86e000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f7feb0c3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7fef306000)
libdouble-conversion.so.1 => not found
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f7fe4860000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7fecc5f000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7febf7d000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f7fe9e73000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7fef50a000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7fec233000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f7fe5f38000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f7fe8c31000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f7fe89e6000)
libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f7fe4a68000)
libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f7fe3cee000)
libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f7fe36a0000)
libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f7fe4453000)
libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f7fe61b9000)
libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f7fe3456000)
libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007f7fe69dd000)
libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007f7fea540000)
libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007f7fea189000)
libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f7fe95f6000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f7fe54ee000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f7fe465c000)
libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f7fe41c6000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f7fe5720000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f7fe50df000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f7fe8586000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f7fe8794000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f7fe9a38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7fece77000)
libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f7fe8f96000)
libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f7fe9813000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f7fe5c09000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f7fe676b000)
libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f7fe91cc000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7febd5e000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f7feda69000)
libQt5Gui.so.5 => not found
libQt5Gui.so.5 => not found
libQt5Gui.so.5 => not found
libQt5Gui.so.5 => not found
libQt5OpenGL.so.5 => /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5 (0x00007f7fed5a3000)
libQt5PrintSupport.so.5 => /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so.5 (0x00007f7fed7fa000)
libQt5Widgets.so.5 => not found
libQt5Widgets.so.5 => not found
libQt5Widgets.so.5 => not found
libQt5X11Extras.so.5 => /usr/lib/x86_64-linux-gnu/libQt5X11Extras.so.5 (0x00007f7fee1b4000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f7fe4ec4000)
libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f7fe3ad8000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f7fe93da000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7feb701000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f7fe4ca9000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f7fe314d000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f7feae59000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7fed215000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f7fe59f6000)
libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f7fe63ed000)
libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f7fe38af000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7fee6d3000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7fec66a000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7fef796000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7fec464000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f7feea0c000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f7fef9be000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f7feb340000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7feb909000)
linux-vdso.so.1 (0x00007ffce770a000)
VBoxKeyboard.so => /usr/lib/virtualbox/VBoxKeyboard.so (0x00007f7fef0f5000)
VBoxRT.so => /usr/lib/virtualbox/VBoxRT.so (0x00007f7feec1e000)
VBoxXPCOM.so => /usr/lib/virtualbox/VBoxXPCOM.so (0x00007f7fee3b8000)
  • Welcome to Ask Ubuntu! Looks like a package may be corrupted. Could you please run sudo apt install --reinstall libqt5core5a and try again? If that fails please [edit] your question to also include the output of apt-cache policy virtualbox-qt libqt5core5a. Thanks. – David Foerster Jun 06 '18 at 21:32
  • Updated with requested information. – Clayton McCray Jun 06 '18 at 21:38
  • 1
    Why not install VB from virtualbox.org? It installs and works well. – Pilot6 Jun 06 '18 at 21:39
  • I tried that and received the same error. I'll add that to the bottom of the question. – Clayton McCray Jun 06 '18 at 21:39
  • @Pilot6: VirtualBox from the official repositories should work even better in theory because they're more thoroughly tested with a particular Ubuntu release. – David Foerster Jun 06 '18 at 21:40
  • Curious. Could you please also add the output of file /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 and ldd /usr/lib/virtualbox/VirtualBox.so | sort? Thanks. – David Foerster Jun 06 '18 at 21:42
  • 1
    @DavidFoerster It is in some other world ;-) I don't think they test it. In many releases it doesn't even install. This is not the first time. But the VB people built a special deb for bionic. – Pilot6 Jun 06 '18 at 21:42
  • https://download.virtualbox.org/virtualbox/5.2.12/virtualbox-5.2_5.2.12-122591~Ubuntu~bionic_amd64.deb – Pilot6 Jun 06 '18 at 21:43
  • GParted also apparently doesn't work on my install. I reinstalled it from the repos, and when I run it from terminal I get a shared object file error, similar in format (but not exact content) to the one VirtualBox gives. Any possibility they're related? – Clayton McCray Jun 06 '18 at 22:08
  • 1
    Yes, they might be related. Are there any other previous errors, customizations, or other backstory we should know about? – user535733 Jun 07 '18 at 03:23
  • The only other issues I’ve had are that when I first installed Ubuntu, grub-init failed to install and the issue that I mentioned in the OP where compiling VirtualBox from source failed. The first issue I believe was caused by my NVMe drive and I fixed it with Boot-Repair and by turning off SecureBoot. The second issue I did not fix, obviously. The installation is basically vanilla. I’ve turned on hot corners and moved the dock to the bottom of my screen, with it shortened and set to hide – Clayton McCray Jun 07 '18 at 13:22

1 Answers1

2

I figured it out. Basically, I had to do sudo apt install --reinstall package on a lot of different packages until it finally worked. I really have no idea why, but just installing the necessary packages wasn't enough. I had to install then reinstall. Personally, I did:

  1. sudo apt install --reinstall libqt5*
  2. sudo apt install --reinstall libdouble-conversion*
  3. I then got an error saying the xcb plugin wasn't working, and based on the output of ldd /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so I did:
  4. sudo apt install libxcb-xinerama0*
  5. sudo apt install --reinstall libxcb-xinerama0*

and then it VirtualBox began to work. For anyone who read my comments about gparted also not working, a similar process got that up and running as well. This seems like stuff that should be handled by the package manager.