Hi, I know this question has been asked before, but after reading the threads, my situation was not the same. So, I ask the same question:
I have a Qt5.2.1 application using MySQL database on CentOS 6. I called it DEV machine. I tried to deploy to the other machine (called it as APP machine) with only qt-3.3 installed. I had an old application running on APP with QMYSQL3. It is running fine. But when my new applications installed in APP machine, I included every library I need, the new program gives me the errors:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: (blank)
This is my files structure:
/home/myapp/myapplib
/home/myapp/myappexec
/home/myapp/myappexec.sh
I used ldd to find out all the libraries the "myappexec" needed and installed under myapplib directory
the myappexec.sh is written as:
#!/bin/sh
export LD_LIBRARY_PATH=/home/myapp/myapplib
export QT_QPA_PLATFORM_PLUGIN_PATH=/home/myapp/myapplib/plugins/platforms
./myappexec
I have all libqsqlite.so libqsqlmysql.so libqsqlodbc.so libqsqlpsql.so and libQt5Sql.so installed into APP under myapplib. I read something about libmysqlclient_r.so.16, but I could not find it in my DEV, so that I could not install in APP machine.
PS, I had another program "mytest" using the same Qt5.2.1 without using any database, and installed in APP machine that also runs fine.
the .sh is about the same:
#!/bin/sh
export LD_LIBRARY_PATH=/home/myapp/myapplib
export QT_QPA_PLATFORM_PLUGIN_PATH=/home/myapp/myapplib/plugins/platforms
./mytest
Can anyone help me out?
Thanks.
Bookmarks