Migrate Qt App encounters "no Qt platform plugin could be initialized" What else should I configure?
-
Hi folks,
my task is to run a simple Qt v6.8 application (let's call it./myqtapp
, built on other PC then copied to here) on a device with very limited disk space, so I couldn't go with normal installer to install Qt on the device.
What I did was first installed a minimal Debian 12 with LXQt-core on the device, then runldd ./myqtapp
to determine what libraries I'm missing (because LXQt-core brings in some libraries we need), then I copy those unfound.so
from another PC which got Qt6 properly installed, to the device's/usr/lib/
here. I did this untilldd
command shows every library has been found.
Now I run./myqtapp
and it reports the common errorqt.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 the problem.
And now I got stuck with it.
I searched online and some recommend runexport QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
. I did see alibqxcb.so
under this qt5 path, which I guess was brought in when installing lxqt-core. But it doesn't work, the error persists except that""
in error message was replaced with the updated path.
What else should I try, other than simply runapt install
(which failed because 1. not enough space on my device and 2. I need Qt v6.8 while dpkg only supports v6.4)?
Thank you so much! -