2

I am running Crunchbang Linux (Waldorf), a distribution based on Debian Wheezy. I downloaded the most recent virtualbox from here https://www.virtualbox.org/wiki/Linux_Downloads , which is VirtualBox 5.1 for Linux. I run the command

sudo dpkg -i virtualbox-5.1_5.1.0-108711~Debian~wheezy_i386.deb

And here is the entire output:

(Reading database ... 196982 files and directories currently installed.)
Unpacking virtualbox-5.1 (from .../virtualbox-5.1_5.1.0-108711~Debian~wheezy_i386.deb) ...
Setting up virtualbox-5.1 (5.1.0-108711~Debian~wheezy) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...

When I enter the command

virtualbox

I get the following error message:

Qt FATAL: This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.

I installed the package xcb but no change. Any suggestions?

3

I had the same problem with Virtualbox 5.1 on Ubuntu 14.04. I fixed it, maybe not in the best way, but it works:

ldd /usr/lib/virtualbox/plugins/platforms/libqxcb.so | grep not

It lists the broken links to some libraries. Now you can see all those links are in the same folder /usr/lib/virtualbox/, If you don't believe me, try this:

sudo updatedb
locate libQt5XcbQpaVBox.so.5

Then manually create some soft links to a known folder:

sudo ln -s /usr/lib/virtualbox/libQt5XcbQpaVBox.so.5  /lib/i386-linux-gnu/

create a link for each library list listed by running the first command, and that's it!

| improve this answer | |
  • I run into trouble again and your solution helped once again. Thanks again. – Oposum Sep 17 '16 at 20:14
3

xcb is an unrelated package (there are only so many TLAs). You need the Qt plugin called XCB. In Debian jessie it's in libqt5gui5, but the requisite file libqxcb.so isn't in wheezy proper. You need to get it from the wheezy backports.

Note that wheezy is old and unmaintained. You should upgrade.

| improve this answer | |
  • thank you for your comment. I will eventually upgrade but at this time I'm too overwhelmed with other things to upgrade the entire OS. So this time I have to try and use the backport. OK, so I installed the package libqt5gui5 but no change. I went to the link provided by you to find libqxcb.so from wheezy backports but couldn't find it. Is this the right place to look for? backports.debian.org/changes/wheezy-backports.html – Oposum Jul 18 '16 at 0:19
  • @Oposum The package is also called libqt5gui5. You need to add the backports to your apt sources first (follow the instructions on the web page). – Gilles 'SO- stop being evil' Jul 18 '16 at 1:05
  • I did that too obviously – Oposum Jul 18 '16 at 1:08
  • @Oposum Oh, you mean you've successfully installed the package and you're still getting that error? Then I don't know what the problem is, sorry. It might be a version incompatibility between the libraries, but I'm not familiar with Qt plugins so I don't know what the constraints are. – Gilles 'SO- stop being evil' Jul 18 '16 at 1:12
  • I installed libqt5gui5 from synaptic with no problems, added backports to your apt sources, but was unable to find the file libqxcb.soseparately on the backports website that you indicated. – Oposum Jul 18 '16 at 1:19
3

.deb package of VirtualBox depends on libqxcb externally(does not come bundled with it), on installing it and running VirtualBox it showed me this error:

$ VirtualBox
Qt FATAL: This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: minimal, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted

Even finding broken packages by ldd and creating their soft links didn't help me.

But in the .run package, it didn't show any such error because .run package comes with all the dependencies bundled along with it.

I still couldn't find the solution to this error, but here is a workaround you may try to get VirtualBox running by uninstalling the present version and then installing the .run package:

wget https://download.virtualbox.org/virtualbox/5.2.12/VirtualBox-5.2.12-122591-Linux_amd64.run
chmod +x VirtualBox-5.2.12-122591-Linux_amd64.run
sudo ./VirtualBox-5.2.12-122591-Linux_amd64.run

Another solution is to clean Qt build from the system and make it again but it takes a lot of time so I chose this method.

| improve this answer | |
1

For those who are still stuck after trying every other option out there in the internet, you can look into exact path from which this notorious libqxcb.so is being searched in, for opening/loading by the Qt App(VirtualBox-5.2.8 is the Qt app in my case), using the strace tool. In my case, since I was building VirtualBox-5.2.8 from its source, it was searching for libqxcb.so in the below location :
"...VirtualBox-5.2.8/out/linux.amd64/release/bin/platforms/" and not in the default library paths, Qt installation path, etc. So, none of the ldd checks, and other solutions worked. And also setting QT_DEBUG_PLUGINS=1 didn't produce any extra logs either.

Running strace on the the VirtualBox binary I built using Clang/LLVM on Ubuntu 17.10 x86_64:

...VirtualBox-5.2.8$ strace ./out/linux.amd64/release/bin/VirtualBox

.
.
.
access(".../VirtualBox-5.2.8/out/linux.amd64/release/bin/platforms/.", F_OK) = -1 ENOENT (No such file or directory)
write(2, "Qt FATAL: ", 10Qt FATAL: )              = 10
write(2, "This application failed to start"..., 154This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.) = 154
.
.
.

That was my hitting-the-nail-on-its-head moment, and I created the symlink from the installed Qt5.10.1's platforms directory mentioned below : "...Qt5.10.1/Tools/QtCreator/lib/Qt/plugins/platforms/" onto the searched path which is "...VirtualBox-5.2.8/out/linux.amd64/release/bin/". Thus, VirtualBox-5.2.8 built from source on Linux(Ubuntu 17.10 x86_64) using Clang/LLVM, finally launched successfully!

In fact, another interesting thing here is that, I have built VirtualBox-5.2.8 entirely using Clang/Clang++/LLVM on Ubuntu 17.10 x86_64 after substantial effort - for FreeBSD, there's already a port for building VirtualBox using clang but for Linux, it's heavily dependent on GCC as I saw and hence it took a lot of effort to get to this point to be able successfully build VirtualBox-5.2.8 from its source using Clang/Clang++/LLVM on Ubuntu 17.10 x86_64 for target Linux/AMD64(Ubuntu 17.10 x86_64) and successfully launch it after resolving other issues along with this notorious libqxcb.so one.

Cheers.

| improve this answer | |
0

Same problem here installing VirtualBox 5.1.6 on Slackware current. VirtualBox 5.1 needs qt5, which turns out to need the libxkbcommon package (which I hadn't installed). After getting that package from slackbuilds.org, VirtualBox started normally.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.