Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Deploying QT application on Linux fails without leaving message
QtWS25 Last Chance

Deploying QT application on Linux fails without leaving message

Scheduled Pinned Locked Moved Unsolved General and Desktop
deploydeploymentlinuxsqliteinstaller
2 Posts 2 Posters 188 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.
  • W Offline
    W Offline
    William Coelho
    wrote on last edited by
    #1

    In ubuntu 18.04, I have an application that runs perfectly when executed by QTCreator. But when I need to deploy it to generate the installer, the app crashes without leaving a message. These are the steps I execute:

    1. I run the application through QTCreator
    2. I go to the build folder and deploy it with the command:sudo /home/vboxuser/Downloads/linuxdeployqt-continuous-x86_64.AppImage MyApplication -verbose -qmldir=/home/vboxuser/Downloads/signer-css/qml -appimage
    3. I try to run my application with sudo ./MyApplication and it crashes
    4. From the previous and subsequent logs I identified that the program crashes after executing the following line in c++ db = QSqlDatabase::addDatabase("QSQLITE");
    5. I don't understand this, since I have the sqlite lib inside the plugins/sqldrivers folder in the build directory.

    I tried to put libqsqlite.so in the root folder.
    I tried to put libqsqlite.so in the folder of an installer made with QTIntallerFramework
    I tried to do debug and release builds
    I tried to make an installer without doing the deploy

    They all give the same error.

    Does anyone have an idea of ​​what I can do to get the application to run? I don't believe it's a code error, since this same snippet in C++ works for Windows, iOS, Mac and Android.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      A missing SQL plugin should not crash your application unless you do some strange things. At best your queries will fail because no connection can be established.

      However, running your application as root might explain. By default recent Linux distributions forbid running GUI application as root user.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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