Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Hi guys!
I need your help.
I just installed a clean Xubuntu 20.04 OS and I ran this script I found to get my Streamdeck working#!/bin/bash -xe echo "Installing libraries" sudo apt install libhidapi-hidraw0 libudev-dev libusb-1.0-0-dev echo "Adding udev rules and reloading" sudo usermod -a -G plugdev `whoami` sudo tee /etc/udev/rules.d/99-streamdeck.rules << EOF SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev" EOF sudo udevadm control --reload-rules echo "Unplug and replug in device for the new udev rules to take effect" echo "Installing streamdeck_ui" pip3 install --user streamdeck_ui echo "If the installation was successful, run 'streamdeck' to start."
But when I run
streamdeck
I get the following error
Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... Cannot load library /home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory) QLibraryPrivate::loadPlugin failed on "/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)" 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, webgl, xcb. Aborted (core dumped)
When I run
ldd
I get
ldd /home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so | grep "not found" libxcb-icccm.so.4 => not found libxcb-image.so.0 => not found libxcb-keysyms.so.1 => not found libxcb-render-util.so.0 => not found libxcb-xinerama.so.0 => not found libxcb-xkb.so.1 => not found libxkbcommon-x11.so.0 => not found libxcb-icccm.so.4 => not found libxcb-image.so.0 => not found libxcb-keysyms.so.1 => not found libxcb-render-util.so.0 => not found libxcb-xinerama.so.0 => not found libxcb-xkb.so.1 => not found libxkbcommon-x11.so.0 => not found
I ran a search for
libxcb-icccm.so.4
and it is no where to be found except in my OBS install. So I copied
libxcb-icccm.so.4
and
libxcb-icccm.so.4.0.0
and pasted them into
/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/
and tried running
streamdeck
again. But it didn't fix the problem. I got
Got keys from plugin meta data ("xcb") **QFactoryLoader::QFactoryLoader() looking at "/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libxcb-icccm.so.4" "Failed to extract plugin meta data from '/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libxcb-icccm.so.4.0.0'" not a plugin QFactoryLoader::QFactoryLoader() looking at "/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libxcb-icccm.so.4.0.0" "Failed to extract plugin meta data from '/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libxcb-icccm.so.4.0.0'" not a plugin** QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... Cannot load library /home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory) QLibraryPrivate::loadPlugin failed on "/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)" 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, webgl, xcb. Aborted (core dumped)
I'm new to Linux so I'm out of ideas.
Any suggestions would be greatly appreciated.
Thanks! -
Hi, and welcome!
@ReuvenG said in Could not load the Qt platform plugin "xcb" in "" even though it was found.:
So I copied
libxcb-icccm.so.4
and
libxcb-icccm.so.4.0.0
and pasted them into
/home/jl/.local/lib/python3.8/site-packages/PySide2/Qt/plugins/platforms/
Don't do that. Use your package manager to install the missing libraries instead, for example:
sudo apt-get install libxcb-iccm4
You must install all of the libraries that
ldd
reports as "Not found". -
Same issue on CentOS7:
The user has to manually
ldd /opt/qtcreator-4.10.2/lib/Qt/plugins/platforms/libqxcb.so
then dig for each not found lib which package has to be installed:
sudo yum install xcb-util-keysyms
....
I would expect from QtCreator to at least properly warn the customer which libs are missing without having to
export QT_DEBUG_PLUGINS=1