Unable to deploy the release version of QT GUI linux executable
-
i have created a GUI application using QT in Linux. i am able to run it from the release mode of QT. But cant run the executable separately. I am getting a pop-up stating "Could not display "<app_name>". kindly let me know how to deploy this app in a separate individual folder and execute.
-
@solo_engineer
If you want to run a built executable outside of Qt Creator you need to deploy it, so that its dependent libraries can accompany it and be found. Read https://doc.qt.io/qt-6/linux-deployment.html. Most people seem to uselinuxdeployqt
--- see https://github.com/probonopd/linuxdeployqt or https://appimage.github.io/linuxdeployqt/. -
Thanks for the reply. I have installed the same. but stil get this error
sudo ./linuxdeployqt-continuous-x86_64.AppImage Imager/Imager -appimage linuxdeployqt (commit 6fcaf74), build 55 built on 2023-09-23 13:33:41 UTC Not using FHS-like mode app-binary: "/home/conex/Downloads/Imager/Imager" appDirPath: "/home/conex/Downloads/Imager" relativeBinPath: "Imager" Keeping existing AppRun qmakePath 3= "" ERROR: ldd outputLine: "/home/conex/Downloads/Imager/Imager: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/conex/Downloads/Imager/Imager)" ERROR: for binary: "/home/conex/Downloads/Imager/Imager" ERROR: Please ensure that all libraries can be found by ldd. Aborting.
I have installed the linuxdeployqt from here.
inside the folder , i have a Imager executable, .desktop.desktop and then an imager file for app logo.find the contents of .desktop.desktop file
[Desktop Entry] Type=Application Name=Imager Comment=Create an app to generate imager configuration Exec=Imager Icon=logo Categories=Office; X-AppImage-Version=
ss of the app folder:
the path is also set as needed.
export PATH=/home/conex/Qt/5.15.7/gcc_64/bin/:$PATH
Please let me know what is not correct. Thanks in advance