Application failed to start because it could not find or load the Qt platform plugin "linuxfb"
-
Hi Guys.
I cross compiled the Qt5.5.1 source code on a Ubuntu machine, and run the executable file on a embedded ARM. All the .so files I need is accessed using NFS. I wrote a simple demo to check if the work is right , but I just got the error:
Application failed to start because it could not find or load the Qt platform plugin "linuxfb" !I checked the environment variables I may need to change :
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_DEBUG_PLUGINS=1
export QTDIR=my NFS path/Qt5.5.1
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/platforms
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$QTDIR/plugins/platforms/The log when I run the demo :
QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/mg-samples-3.0.12/src/qt/platforms" ... QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/platforms" ... This application failed to start because it could not find or load the Qt platform plugin "linuxfd". Available platform plugins are: linuxfb (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms), minimal (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms), offscreen (from /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms). Reinstalling the application may fix this problem. Aborted
I think I've placed the .so libs at the right place. But I don't know why I get this ? How can I fixed it ?
Thanks. -
Sorry for misspelling.. It's the same error when I corrected it..But this time the log says:
QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so" Found metadata in lib /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 328961 } Got keys from plugin meta data ("offscreen") loaded library "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so" QLibraryPrivate::loadPlugin failed on "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so" : "Cannot load library /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/libqlinuxfb.so: (**File not found**)" QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/mg-samples-3.0.12/src/qt/platforms" ... QFactoryLoader::QFactoryLoader() checking directory path "/opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms/platforms" ... This application failed to start because it could not find or load the Qt platform plugin "linuxfb".
libqlinuxfb.so (FIle not found), but I got these libs at the env variable.
ls /opt/ipnc/4keptz_project/4keptz_project.si4project/Qt/plugins/platforms
libqlinuxfb.so libqminimal.so libqoffscreen.so
I don't know what happened.. -
Hi,
Might be a silly question but did you install your cross-compiled Qt on your device ?
-
@SGaist
I installed my .so libs and app on the Ubuntu. And I run and loaded the libs using NFS.
I found the function "load_sys" in qlibrary_unix.cpp:
pHnd = dlopen(QFile::encodeName(attempt), dlFlags);
always return NULL, the error is : File not Found...But the .so file is just here. -
I ‘ve fixed this error’. I add a third party .so in libqlinux.so, but I forgot to set the LD_LIBRARY_PATH to include that .so file. It's really a silly question..sry .