Qt6 missing "libqxcb.so" file
-
When trying to execute QtCreator for Qt 6.3.0, the following error appears:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" 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.However, it is possible to run on Qt5, that was already installed on the machine.
Inspecting the plugins folder "/path/to/Qt/6.3.0/plugins/platforms/", there is no "libqxcb.so" file. Only the following:
libqeglfs.so libqlinuxfb.so libqminimalegl.so libqminimal.so libqoffscreen.so libqvnc.so
So it was not possible to use the ldd command.
On the Qt5 installation directory, it was possible to find the "libqxcb.so" file, however, it links to Qt5 dependencies.
Copying libqxcb.so and pasting on the Debug project using Qt6, the following error message appears:
Plugin uses incompatible Qt library (5.15.0) [release] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" 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.When I use ldd command on the executable generated on the Debug directory, the following is found:
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fe69098b000)And makind ldd on the path found "/lib64/libxcb.so.1"
linux-vdso.so.1 (0x00007fff2f453000) libXau.so.6 => /lib64/libXau.so.6 (0x00007f149989e000) libc.so.6 => /lib64/libc.so.6 (0x00007f14994d9000) /lib64/ld-linux-x86-64.so.2 (0x00007f1499ccb000)How do i install the libqxcb on Qt6 using Red Hat SO?
-
It is not clear if the problem is starting Qt Creator itself or starting an application built in the Qt Creator environment.
How was Qt Creator installed? Qt Creator out of the online binary installer certainly includes the Xcb platform plugin in its runtime copy of Qt.
chrisw@newton:~/Qt/Tools/QtCreator/lib/Qt/plugins/platforms$ ls -l *xcb* -rwxr-xr-x 1 chrisw chrisw 19056 Aug 11 11:29 libqxcb.soCopies of Qt against which you build your applications also include this platform plugin when they come from the online installer:
chrisw@newton:~/Qt$ find {5,6}* -type f -name 'libqxcb.so' 5.15.2/gcc_64/plugins/platforms/libqxcb.so 6.4.0/gcc_64/plugins/platforms/libqxcb.so -
It is not clear if the problem is starting Qt Creator itself or starting an application built in the Qt Creator environment.
How was Qt Creator installed? Qt Creator out of the online binary installer certainly includes the Xcb platform plugin in its runtime copy of Qt.
chrisw@newton:~/Qt/Tools/QtCreator/lib/Qt/plugins/platforms$ ls -l *xcb* -rwxr-xr-x 1 chrisw chrisw 19056 Aug 11 11:29 libqxcb.soCopies of Qt against which you build your applications also include this platform plugin when they come from the online installer:
chrisw@newton:~/Qt$ find {5,6}* -type f -name 'libqxcb.so' 5.15.2/gcc_64/plugins/platforms/libqxcb.so 6.4.0/gcc_64/plugins/platforms/libqxcb.so[user@localhost opt]$ /opt/Qt$ find {5,6}* -type f -name 'libqxcb.so' bash: /opt/Qt$: No such file or directoryQt Creator also doesn't have the xcb:
libqeglfs.so libqminimalegl.so libqoffscreen.so libqlinuxfb.so libqminimal.so libqvnc.soThe installation was done building the binaries, this is the version:
Qt Creator 4.12.4 Based on Qt 5.15.2 (GCC 8.5.0 20210514 (Red Hat 8.5.0-10), 64 bit) Copyright 2008-2020 The Qt Company Ltd. All rights reserved.And the binaries on Qt 6.3.0 was built separatedly, do I need to upgrade the Qt Creator Version? Because libqxcb.so only works on Qt5
-
On RedHat RHEL some dependencies must be installed, however, they are not enabled.
You need to enable Code Ready Linux Builder: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/codereadylinuxbuilder-repository
-
[user@localhost opt]$ /opt/Qt$ find {5,6}* -type f -name 'libqxcb.so' bash: /opt/Qt$: No such file or directoryQt Creator also doesn't have the xcb:
libqeglfs.so libqminimalegl.so libqoffscreen.so libqlinuxfb.so libqminimal.so libqvnc.soThe installation was done building the binaries, this is the version:
Qt Creator 4.12.4 Based on Qt 5.15.2 (GCC 8.5.0 20210514 (Red Hat 8.5.0-10), 64 bit) Copyright 2008-2020 The Qt Company Ltd. All rights reserved.And the binaries on Qt 6.3.0 was built separatedly, do I need to upgrade the Qt Creator Version? Because libqxcb.so only works on Qt5
@danieltak I still do not know how you installed Qt Creator. What "done building the binaries" means is unclear. It looks like you have installed a set of Qt binaries provided by Redhat and not those provided by Qt Company.
The old Qt Creator version you have was built with Qt 5.15.2, so it should quite happily use the platform plugins from that Qt version. If that Qt version was built without Xcb support, e.g. deliberately or because libxcb was not present, then you cannot use that functionality until you add it. I do not have a RHEL8 installation to tell you exactly what your course of action should be.
It really seems to me that Qt development on RHEL8 is a perennial problem. The easiest path would be to ignore the system packages and use the QT Company online installer to make a completely independent Qt development tool set.
-
Thank you @ChrisW67
Qt Creator and Qt was installed from Qt sources, however, the person that installed ignored the warnings and dependencies, so some packages weren't installed.
I am enabling Code Ready for RHEL and installing the required dependencies that are missing.
I also think that RHEL isn't the right OS for development.