Hello everyone. I have some troubles when I deploy my app into Linux-platform. Unless specifically the problem lies in the platforms and sqldivers plugins.
There’r the steps what I did:
I compiled my app in Linux-platform and it’s run perfect via QtCreator.
Next I temporary renamed some folder in path to Qt environment to disable this environment.
Next I created a folder e.g. /home/user/bin and replaced my app file, my libs, needed Qt -libs.
Then I added in .bashrc file LD_LIBRARY_PATH variable:
.bashrc:
…
LD_LIBRARY_PATH=/home/usr/bin
export LD_LIBRARY_PATH
Next I run ldd ./myapp to check libraries needed. All libs present.
Then I copied platforms and sqldrivers folders to my app folder.
Finally my distribution looks like:
platforms
sqldrivers
myapp
libme.so.1
libQt5Core.so.5
libQt5Gui.so.5
…
platforms folder:
libqxcb.so
libqoffscreen.so
libqminimal.so
libqlinuxfb.so
sqldrivers folder:
libqsqlmysql.so
libqsqlite.so
And when I do ./myapp in bash I see:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers:
QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins
This application failed to start because it could not find or load the Qt platform plugin “xcb”
Then I added QT_QPA_PLATFORM_PLUGIN_PATH=/home/user/bin/platforms. Error messages were changed:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers:
QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins
QFontDatabase: Cannot find font directory /home/usr/Qt/qtbase/lib/fonts – is Qt installed correctly?
At the moment I do not know what to do.
↧