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.

  • Could you add the output of qtchooser -print-env – user.dz Apr 04 '18 at 21:16
  • Try the solution in this post https://askubuntu.com/q/435564/26246 , it could be a duplicate. – user.dz Apr 04 '18 at 23:12
  • Does VirtualBox open if you use LD_LIBRARY_PATH=/home/moufid/Qt/5.10.1/gcc_64/lib/ virtualbox? – gsxruk Apr 07 '18 at 13:41
  • Unfortunately no, it's displaying the same error message... – Moufid Taleb Apr 08 '18 at 00: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 08 '18 at 06:50
  • If not, could you check that you do have a /home/moufid/Qt/5.10.1/gcc_64/lib/ folder? I'm guessing you may not have actually installed the Qt5 libraries. – gsxruk Apr 08 '18 at 07:19
  • If you look at the output you have posted, the libraries listed are located at /usr/lib/x86_64-linux-gnu/ and not /home/moufid/Qt/5.10.1/gcc_64/lib/. This suggests that they are not located there. If you browse to this folder, does it contain all the files in the listing? – gsxruk Apr 08 '18 at 13:11
  • Yes, manually checked for them with Nautilus, and I can confirm you that these files are all located in /home/moufid/Qt/5.10.1/gcc_64/lib/ – Moufid Taleb Apr 08 '18 at 22:25
  • What are the permissions for the folders containing the libraries? Also, check you typed the command correctly. In your text above you are missing the 'L' at the beginning of LD_LIBRARY_PATH. If the permissions are ok and the command is typed correctly I don't see why it wouldn't be selecting the libraries within that folder. – gsxruk Apr 11 '18 at 16:10

1 Answers1

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 :)