Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in ""
-
I have downloaded Qt5 and QtCreator source code from the official web site and compiled them using CMake, anyway only QtCreator is installed (No QtDesigner) and I can't even launch it, when I try to launch it I got the following error:
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. Aborted (core dumped)with QT_DEBUG_PLUGINS=1
Got keys from plugin meta data ("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a" QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl" QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 1, "className": "QWebGLIntegrationPlugin", "debug": true, "version": 331520 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() checking directory path "/home/nasser/Programs/Qt5/Qt_Creator/qtcreator_build/bin/platforms" ... 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. Aborted (core dumped)I have searched for this for 3 days and nothing changed, I even re-installed the xorg, note that I although work with OpenGL and GLFW and it works well.
*Note: The first time I faced the problem was when I try to run an application inside QtCreator(I downloaded it via apt), and it gave me the same message, so I removed it and compiled it from source, now I can't even launch Qt with the same message.
Thanks in advance.
EDIT:
System specification:
OS: Ubuntu 18.04.5 LTS
Laptop: DELL LATITUDE E6540 -
Hi
And its not missing Dependencies as seen on ubuntu ?
https://forum.qt.io/topic/116299/qt-creator-ubuntu-20-04
Also The error "is not an ELF object" seem really strange.
What platform/Os is this ?
-
Hi
And its not missing Dependencies as seen on ubuntu ?
https://forum.qt.io/topic/116299/qt-creator-ubuntu-20-04
Also The error "is not an ELF object" seem really strange.
What platform/Os is this ?
@mrjj
Sorry I forgot to add it, here it's
OS: Ubuntu 18.04.5 LTS
Laptop: DELL LATITUDE E6540
And I have tried the topic in the link and the solution didn't work for me either -
I have downloaded Qt5 and QtCreator source code from the official web site and compiled them using CMake, anyway only QtCreator is installed (No QtDesigner) and I can't even launch it, when I try to launch it I got the following error:
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. Aborted (core dumped)with QT_DEBUG_PLUGINS=1
Got keys from plugin meta data ("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a" QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.a' is not an ELF object" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl" QElfParser: '/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object "'/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.prl' is not an ELF object" not a plugin QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 1, "className": "QWebGLIntegrationPlugin", "debug": true, "version": 331520 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() checking directory path "/home/nasser/Programs/Qt5/Qt_Creator/qtcreator_build/bin/platforms" ... 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. Aborted (core dumped)I have searched for this for 3 days and nothing changed, I even re-installed the xorg, note that I although work with OpenGL and GLFW and it works well.
*Note: The first time I faced the problem was when I try to run an application inside QtCreator(I downloaded it via apt), and it gave me the same message, so I removed it and compiled it from source, now I can't even launch Qt with the same message.
Thanks in advance.
EDIT:
System specification:
OS: Ubuntu 18.04.5 LTS
Laptop: DELL LATITUDE E6540@Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl
XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).
-
@mrjj
Sorry I forgot to add it, here it's
OS: Ubuntu 18.04.5 LTS
Laptop: DELL LATITUDE E6540
And I have tried the topic in the link and the solution didn't work for me eitherIs there any reason you can't just install it via the Qt online installer ?
I mean versus bulding it yourself .
-
Hi,
Beside the points of my fellows, did you build Qt as a static framework ?
-
@Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl
XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).
@jsulm Sorry for late reply, I took the whole day yesterday compiling it again.
Yeah thanks a lot for the hint icb_iccm wasn't installed, so I have installed it, and now there is no errors in config.log, but when I rebuild it, it takes 3:30 hoursmake -j 4and it gave me the following errors, I couldn't catch them all as I build it from the terminal window because it takes too much and the laptop fan is getting too high.
the errors are:ninja: build stopped: subcommand failed Makefile.gn_rn:1231: recipe for target 'run_ninja' failed Makefile: 82: recipe for target 'sub-gn_run-pro-make_first' failed Makefile: 79: recipe for target 'sub-core-make_first' failed Makefile: 48: recipe for target 'sub-src-make_first' failed Makefile: 1078: recipe for target 'module-qtwebengine-make_first' failed make: *** [module-qtwebengine-make_first] Error 2In the last time(before xcb_iccm), it took less time and compiled without errors.
Edit:
Configuration command:
../qt-everywhere-src-5.15.2/configure -debug -nomake examples -nomake testsBuild command:
make -j 4 -
Is there any reason you can't just install it via the Qt online installer ?
I mean versus bulding it yourself .
@mrjj Well, building it my self will allow me to customize the version, and I also I use the OpenSource version, I didn't think about online installer as I build every thing myself
-
Did you rebuild Qt from a clean state ?
Unless you plan to use all modules, I would recommend skipping those that you will not use right now (especially webengine as it is pretty heavy and long to build). This will speed up things and use less space on your hard drive. -
@SGaist It's a great a idea, but I didn't try it as I will have to manage every thing manually for each application
-
Did you rebuild Qt from a clean state ?
Unless you plan to use all modules, I would recommend skipping those that you will not use right now (especially webengine as it is pretty heavy and long to build). This will speed up things and use less space on your hard drive.@SGaist I have skipped QTWebengine and it took only 2 hours, but when I run Qt Creator again it gives me the same error, I also rebooted my laptop
-
@jsulm Sorry for late reply, I took the whole day yesterday compiling it again.
Yeah thanks a lot for the hint icb_iccm wasn't installed, so I have installed it, and now there is no errors in config.log, but when I rebuild it, it takes 3:30 hoursmake -j 4and it gave me the following errors, I couldn't catch them all as I build it from the terminal window because it takes too much and the laptop fan is getting too high.
the errors are:ninja: build stopped: subcommand failed Makefile.gn_rn:1231: recipe for target 'run_ninja' failed Makefile: 82: recipe for target 'sub-gn_run-pro-make_first' failed Makefile: 79: recipe for target 'sub-core-make_first' failed Makefile: 48: recipe for target 'sub-src-make_first' failed Makefile: 1078: recipe for target 'module-qtwebengine-make_first' failed make: *** [module-qtwebengine-make_first] Error 2In the last time(before xcb_iccm), it took less time and compiled without errors.
Edit:
Configuration command:
../qt-everywhere-src-5.15.2/configure -debug -nomake examples -nomake testsBuild command:
make -j 4@Nasser-Ahmed Okay, I have skipped QtWebEngine and it didn't give me the error in Qt compilation, but when I run the QtCreator it still have the original error
-
Then from the looks of it, you are missing some of the xcb dependencies hence the plugin is not built.
-
@Nasser-Ahmed said in Can't launch QtCreator, Couldn't find Qt platform plugin "xcb" in "":
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl
XCB plug-in wasn't built. You should check config.log file from your Qt build folder to see why (usually some dependencies are missing).
@jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 330752
}Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 127.0.0.1:86.0
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, xcb.
Aborted
Thank you
-
@jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 330752
}Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 127.0.0.1:86.0
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, xcb.
Aborted
Thank you
-
@jsulm Could you please help me , In Ubuntu 20, i installed qtcreator and started X11(Xlanuch), I am getting this error.
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 330752
}Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display 127.0.0.1:86.0
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, xcb.
Aborted
Thank you