我是Qt的新手,试图将mysql与qt集成 但不幸的是显示此错误
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
open fail
"Driver not loaded"
我遵循了本文档https://doc.qt.io/qt-5/sql-driver.html#qmysql
**/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers# qmake -- MYSQL_PREFIX=/usr/local**
Running configuration tests...
Done running configuration tests.
Configure summary:
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/usr'.
Prior to reconfiguration, make sure you remove any leftovers from
the previous build.
**/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers# make sub-mysql**
cd mysql/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql/mysql.pro MYSQL_PREFIX=/usr/local ) && make -f Makefile
make[1]: Entering directory '/home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory '/home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql'
/home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql# make -f Makefile
make: Nothing to be done for 'first'.
**Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql# make install**
/usr/lib/qt5/bin/qmake -install qinstall -exe ../plugins/sqldrivers/libqsqlmysql.so /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so
/usr/lib/qt5/bin/qmake -install qinstall /home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/lib/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake /usr/lib/x86_64-linux-gnu/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake
root@sujith-HP-Notebook:/home/sujith/Qt5.14.0/5.14.0/Src/qtbase/src/plugins/sqldrivers/mysql#
我找不到我想念的地方。