Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Migrate Qt App encounters "no Qt platform plugin could be initialized" What else should I configure?
Forum Updated to NodeBB v4.3 + New Features

Migrate Qt App encounters "no Qt platform plugin could be initialized" What else should I configure?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 389 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Phanuer.Oyviz
    wrote on last edited by Phanuer.Oyviz
    #1

    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 run ldd ./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 until ldd command shows every library has been found.
    Now I run ./myqtapp and it reports the common 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 the problem.
    

    And now I got stuck with it.
    I searched online and some recommend run export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms. I did see a libqxcb.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 run apt 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!

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, using a Qt5 platform plugin for a Qt6 app does not work as you noticed.
      Also mixing Qt 6.8 and 6.4 is a bad idea. If you're out of disk space for installing Qt 6.8, using the default Qt 6.4.2 that comes with Debian 12 is probably your best bet.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved