1

Young developer in training I'm new to Ubuntu, and I'm having trouble working with ...

Indeed, some applications do not launch because of a library defect. These applications seems to be those dependent on Qt libraries.

For the needs of my networking classes, I installed VirtualBox. But when it was launched, the terminal insulted me:

$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: eglfs, linuxfb, minimal, minimalgl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
Abandonment (core dumped)

Do you have an idea of ​​what can go wrong?

In the course of my research on the Internet (it's been three days that I don't find any solution), I could see that there was probably a link with the file libqxcb.so

This may be a library, or would make the link with a library ... Still, the way seems "broken" somewhere, and I have no idea how to fix it.

However, I have two copies of libqxcb.so in two Qt directories, and running the ldd libqxcb.so command after putting me in these directories does not give me an answer where it says "Not found".

I installed the 3 virtualbox packages with the repository, and reinstalled them with Synaptic without success.

As for Qt, I installed it once (in version 4) via the Ubuntu repositories, then the version 5 with the .run installer provided by the Qt official website.

Also noticed today that I was unable to launch wireshark. It also may be cause by a deficient Qt library, but not the same? These things probably are related...

moufid@Moufid:~$ wireshark
wireshark: error while loading shared libraries: libQt5Network.so.5: cannot open shared object file: No such file or directory

Thank you in advance to all for your help and your ideas!

Here was the requested output of qtchooser -print-env

QT_SELECT="default"
QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt4/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

I tried the solution of this post but it didn't worked.

Now, the output of qtchooser -print-env is:

QT_SELECT="default"
QTTOOLDIR="/home/moufid/Qt/5.10.1/gcc_64/bin"
QTLIBDIR="/home/moufid/Qt/5.10.1/gcc_64/lib"

This it the output of LD_LIBRARY_PATH=/home/moufid/Qt/5.10.1/gcc_64/lib/ ldd /usr/lib/virtualbox/VirtualBox.so | grep Qt:

libQt5X11Extras.so.5 => /usr/lib/x86_64-linux-gnu/libQt5X11Extras.so.5 (0x00007fd081d21000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fd0815d8000)
libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fd080e71000)
libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fd08062d000)
libQt5PrintSupport.so.5 => /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so.5 (0x00007fd0803be000)
libQt5OpenGL.so.5 => /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5 (0x00007fd080167000)

It looks like some of the libs are installed? I do have all these files at /home/moufid/Qt/5.10.1/gcc_64/lib/ (checked for them). The CHMOD of the /usr/lib/x86_64-linux-gnu/ folder is 755.

9
  • Could you add the output of qtchooser -print-env
    – user.dz
    Apr 4, 2018 at 21:16
  • Try the solution in this post askubuntu.com/q/435564/26246 , it could be a duplicate.
    – user.dz
    Apr 4, 2018 at 23:12
  • Does VirtualBox open if you use LD_LIBRARY_PATH=/home/moufid/Qt/5.10.1/gcc_64/lib/ virtualbox?
    – gsxruk
    Apr 7, 2018 at 13:41
  • Unfortunately no, it's displaying the same error message... Apr 8, 2018 at 0:10
  • Could you check the Qt libraries are found using this command LD_LIBRARY_PATH=/home/moufid/Qt/5.10.1/gcc_64/lib/ ldd /usr/lib/virtualbox/VirtualBox.so | grep Qt?
    – gsxruk
    Apr 8, 2018 at 6:50

1 Answer 1

0

I recently ran into a similar problem with wireshark:

  • wireshark 3.2.3
  • ubuntu 20.04
  • using i3wm

Error message:

$ wireshark 
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)

After:

  • trying to set QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/, and
  • and running with QT_DEBUG_PLUGINS=1

I found a fix.

Strangely the fix, for me, was simply to explicitly set the DISPLAY environment variable:

DISPLAY=:0 wireshark

I would have thought that a sane default for DISPLAY would be used. But this did the trick. I can't be sure if this fixes the same problem above, but because I didn't find this answer anywhere else, is seem worth sharing :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .