qt.qpa.plugin: Could not load the Qt platform plugin 'xcb' in '/usr/local/bin/plugins/' even though it was found.
Mon, Nov 16, 2020
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/bin/plugins/" 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: xcb.
I installed a Qt program (deb) built on my development system on another system, but when I ran the program I get the above error.
$ env QT_DEBUG_PLUGINS=1 ./programName
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/lib/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
Cannot load library /usr/local/bin/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/usr/local/bin/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/bin/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/bin/plugins/" 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: xcb.
$ sudo apt-cache search libxkbcommon
libxkbcommon-dev - library interface to the XKB compiler - development files
libxkbcommon-x11-0 - library to create keymaps with the XKB X11 protocol
libxkbcommon-x11-dev - library to create keymaps with the XKB X11 protocol - development files
libxkbcommon0 - library interface to the XKB compiler - shared library
libxkbcommon-doc - library interface to the XKB compiler - documentation
$ sudo apt-get install libxkbcommon-x11-0