Error when deploying Qt Application
-
In present I'm working on Ubuntu 16.04 , and building an app in Qt Creator 4.0.3 here i want to run my binary file in another linux platform and also in other computer, where I've watched in this video https://www.youtube.com/watch?v=PDzlT_ODpM8 , my first question how do I get that linuxdeployqt.appimage?
As they recommended to download from this https://github.com/probonopd/linuxdeployqt/commits/master
my second problem was building that downloaded file which gave me error like this so please help me how to deploy my qt app???/home/ubuntu16qt/Qt5.6.2/5.6/gcc_64/mkspecs/features/qt_tool.prf:54: error: Cannot write file /mkspecs/modules/qt_tool_linuxdeployqt.pri: Cannot create parent directory
:-1: error: Aborting.
-
@Vineela said in Error when deploying Qt Application:
In present I'm working on Ubuntu 16.04 , and building an app in Qt Creator 4.0.3 here i want to run my binary file in another linux platform and also in other computer, where I've watched in this video https://www.youtube.com/watch?v=PDzlT_ODpM8 , my first question how do I get that linuxdeployqt.appimage?
As they recommended to download from this https://github.com/probonopd/linuxdeployqt/commits/master
my second problem was building that downloaded file which gave me error like this so please help me how to deploy my qt app???/home/ubuntu16qt/Qt5.6.2/5.6/gcc_64/mkspecs/features/qt_tool.prf:54: error: Cannot write file /mkspecs/modules/qt_tool_linuxdeployqt.pri: Cannot create parent directory
:-1: error: Aborting.
Here is proper link for releases: https://github.com/probonopd/linuxdeployqt/releases
I have no idea why GitHub does not show a handy link to that page anywhere.
Regarding other bug - no idea, I have never encountered it myself.
-
I just want to know in this video https://www.youtube.com/watch?v=PDzlT_ODpM8 at 8:40 how does he get that linuxdeployqt.appimage thats it my problem will solve. :(
-
Don't download the ZIP, download the .appimage file (linuxdeployqt-continuous-x86_64.AppImage, 14 MB).
-
@sierdzio well yes i did that and this was the error found in Terminal
$ /home/ubuntu16qt/Documents/linuxdeployqt-continuous-x86_64.AppImage /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient
linuxdeployqt 6 (commit cfa4dc5), build 653 built on 2019-03-09 21:04:59 UTC
Not using FHS-like mode
app-binary: "/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient"
appDirPath: "/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release"
relativeBinPath: "Thinclient"
WARNING: Plugin "/home/ubuntu16qt/Qt5.6.2/5.6/gcc_64/plugins/styles/libqgtk2style.so" not found, skipping
ERROR: ldd outputLine: "libmysqlclient_r.so.16 => not found"
ERROR: for binary: "/home/ubuntu16qt/Qt5.6.2/5.6/gcc_64/plugins/sqldrivers/libqsqlmysql.so"
ERROR: Please ensure that all libraries can be found by ldd. Aborting. -
Yeah, that happens a lot. Does your application use MySQL? Some workarounds are available https://github.com/probonopd/linuxdeployqt/issues/235 Basically you can instruct linuxdeployqt to skip this plugin (https://github.com/probonopd/linuxdeployqt/pull/253).
-
Alright, then you can skip MySQL plugin safely.
-
@Vineela said in Error when deploying Qt Application:
@sierdzio so what do you think abt this error
ERROR: Please ensure that all libraries can be found by ldd. Aborting.
what am i missing?Ignore it. Focus on this, which is the real error:
ERROR: ldd outputLine: "libmysqlclient_r.so.16 => not found"
And skip that plugin. According to the docs, this should work:
-exclude-libs=libqsqlmysql
But I've never tried that option myself so can't say with certainty.
Why you can skip/ ignore? The error is about a plugin. Your application does not use that plugin, so it won't load it at runtime, and that means it will not crash with "missing library" in practice.
-
That does not sound to be Qt-related.
Use Dropbox maybe? Format your pendrive? I don't know what the problem is so I can't help. AppImage files are normal binary files, they should copy just like any other file.
-
'/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient'
/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: versionQt_5' not found (required by /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient) /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient: /usr/lib/x86_64-linux-gnu/libQt5Sql.so.5: version
Qt_5' not found (required by /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient)
/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: versionQt_5' not found (required by /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient) /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version
Qt_5.6' not found (required by /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient)
/home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by /home/ubuntu16qt/Documents/build-Thinclient-Desktop_Qt_5_6_2_GCC_64bit-Release/Thinclient)this is my error for now
and what shud i do with this , -exclude-libs=libqsqlmysql??? -
When does this error show up? During compilation? Linking? Or when you try to run the executable?
I think the issue is that Qt version installed in your system is different from one ThinClient is linked against. If you have your AppImage binary created already - run that instead of ThinClient file itself.