Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?
-
Hello,
can someone explain to me the simplest possible way to complete the installation with MySQL driver in Ubuntu?I installed and used Qt a few months ago and now, probably because of some system update, I am getting
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Since it took me a lot of time back then to fix the same problem, I am searching for the simplest painless way to get everything working in Ubuntu without spending days trying every solution listed in this forum. Last time it was really exhausting!
Thanks in advance
-
Hello,
can someone explain to me the simplest possible way to complete the installation with MySQL driver in Ubuntu?I installed and used Qt a few months ago and now, probably because of some system update, I am getting
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
Since it took me a lot of time back then to fix the same problem, I am searching for the simplest painless way to get everything working in Ubuntu without spending days trying every solution listed in this forum. Last time it was really exhausting!
Thanks in advance
@enne9
Have you installedlibqt5sql5-mysql
, https://packages.ubuntu.com/disco/libqt5sql5-mysql ? (Do throughapt-get
.)Otherwise if it used to work and has stopped, you could
ldd
the library.so
files, and from docsTo obtain diagnostic information from Qt, about each plugin it tries to load, use the
QT_DEBUG_PLUGINS
environment variable. Set this variable to a non-zero value in the environment where your application is launched. -
@enne9
Have you installedlibqt5sql5-mysql
, https://packages.ubuntu.com/disco/libqt5sql5-mysql ? (Do throughapt-get
.)Otherwise if it used to work and has stopped, you could
ldd
the library.so
files, and from docsTo obtain diagnostic information from Qt, about each plugin it tries to load, use the
QT_DEBUG_PLUGINS
environment variable. Set this variable to a non-zero value in the environment where your application is launched.@JonB I have reinstalled everything starting from the offline installer (https://www.qt.io/offline-installers). What are the next steps? I tried installing
libqt5sql5-mysql
but it is not solving the problem. Any suggestion? I noticed also that now it is not even proposingQMYSQL
:QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
-
@JonB I have reinstalled everything starting from the offline installer (https://www.qt.io/offline-installers). What are the next steps? I tried installing
libqt5sql5-mysql
but it is not solving the problem. Any suggestion? I noticed also that now it is not even proposingQMYSQL
:QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
-
@JonB I have reinstalled everything starting from the offline installer (https://www.qt.io/offline-installers). What are the next steps? I tried installing
libqt5sql5-mysql
but it is not solving the problem. Any suggestion? I noticed also that now it is not even proposingQMYSQL
:QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
@enne9 As far as I know you need to build MySQL plug-in by yourself (because of legal reasons).
Install the libmysql-dev package and check https://doc.qt.io/qt-5/sql-driver.html for instructions how to build. -
@JonB said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
QT_DEBUG_PLUGINS
I used it, but I am a beginner and I don't know what to search for. This is the output:
QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqeglfs.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqlinuxfb.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqminimal.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqminimalegl.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqoffscreen.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqvnc.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-egl.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("wayland-egl") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-generic.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archreq": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("wayland") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("wayland-xcomposite-egl") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("wayland-xcomposite-glx") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwebgl.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqxcb.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/platforms" ... loaded library "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqgtk3.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqgtk3.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "gtk3" ] }, "archreq": 0, "className": "QGtk3ThemePlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("gtk3") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "xdgdesktopportal", "flatpak", "snap" ] }, "archreq": 0, "className": "QXdgDesktopPortalThemePlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("xdgdesktopportal", "flatpak", "snap") QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/platformthemes" ... loaded library "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqgtk3.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts" ... QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "compose", "xim" ] }, "archreq": 0, "className": "QComposePlatformInputContextPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("compose", "xim") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "ibus" ] }, "archreq": 0, "className": "QIbusPlatformInputContextPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("ibus") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "qtvirtualkeyboard" ] }, "archreq": 0, "className": "QVirtualKeyboardPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("qtvirtualkeyboard") QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/platforminputcontexts" ... loaded library "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers" ... QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlite.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlite.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QSQLITE" ] }, "archreq": 0, "className": "QSQLiteDriverPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("QSQLITE") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlodbc.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlodbc.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QODBC3", "QODBC" ] }, "archreq": 0, "className": "QODBCDriverPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("QODBC3", "QODBC") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlpsql.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers/libqsqlpsql.so, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QPSQL7", "QPSQL" ] }, "archreq": 0, "className": "QPSQLDriverPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("QPSQL7", "QPSQL") QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/sqldrivers" ... QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 Numero di thread: 8 QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations" ... QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_egl" ] }, "archreq": 0, "className": "QXcbEglIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("xcb_egl") QFactoryLoader::QFactoryLoader() looking at "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" Found metadata in lib /home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata= { "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5", "MetaData": { "Keys": [ "xcb_glx" ] }, "archreq": 0, "className": "QXcbGlxIntegrationPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("xcb_glx") QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/xcbglintegrations" ... loaded library "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/accessible" ... Test QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/enrico/Desktop/Documenti/PDS_project/build-SharedEditor-Desktop_Qt_5_14_1_GCC_64bit-Debug/Server/accessiblebridge" ... QLibraryPrivate::unload succeeded on "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so" QLibraryPrivate::unload succeeded on "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" QLibraryPrivate::unload succeeded on "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platformthemes/libqgtk3.so" QLibraryPrivate::unload succeeded on "/home/enrico/Qt5.14.1/5.14.1/gcc_64/plugins/platforms/libqxcb.so" QLibraryPrivate::unload succeeded on "Xcursor" (faked)
-
@enne9 As far as I know you need to build MySQL plug-in by yourself (because of legal reasons).
Install the libmysql-dev package and check https://doc.qt.io/qt-5/sql-driver.html for instructions how to build.@jsulm This is part of the output when I just run
./configure
. Why is there no "yes" near "MySql"?
If I run
./configure -sql-mysql
it shows
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
What am I doing wrong?I also noted that there was already a file
/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so
and I copied it in~/Qt5.14.1/5.14.1/gcc_64/plugins/sqldrivers
but it says:
Cannot mix incompatible Qt library (version 0x50c04) with this library (version 0x50e01)
How can I get the compatible version? -
@enne9 Please check the configure log and read once more what I wrote before: "Install the libmysql-dev package".
And please do not push for answers - people here are volunteers spending their own time to help... -
Did you re-run configure from a clean state ? If not, as suggested in the summary, you should clean the sources if you called configure it.
Better yet, do an out of source build so that you can just nuke the build folder to restart fresh.
If it is still failing, then check the test logs to see exactly why the detection failed.
-
@jsulm there is no
libmysql-dev
package, I instead installedlibmysqlclient-dev
.
The error I am getting is stillERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
Sorry, I wasn't pushing and I am sorry if it seemed so.
@enne9 said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
libmysqlclient-dev
This one should be the correct one.
Did you check config.log to see whether there are more specific errors regarding MySQL plug-in? -
@enne9 As far as I know you need to build MySQL plug-in by yourself (because of legal reasons).
Install the libmysql-dev package and check https://doc.qt.io/qt-5/sql-driver.html for instructions how to build.@jsulm said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
@enne9 As far as I know you need to build MySQL plug-in by yourself (because of legal reasons).
Install the libmysql-dev package and check https://doc.qt.io/qt-5/sql-driver.html for instructions how to build.Just for clarification: I have used Qt & MySQL up to Ubuntu 19.04. I have only ever had to use
apt-get
for packages, I have never had to compile/build/configure Qt or anything MySQL. Did the change requiring needing to build MySQL plug-in come in at 19.10? -
@jsulm said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
@enne9 As far as I know you need to build MySQL plug-in by yourself (because of legal reasons).
Install the libmysql-dev package and check https://doc.qt.io/qt-5/sql-driver.html for instructions how to build.Just for clarification: I have used Qt & MySQL up to Ubuntu 19.04. I have only ever had to use
apt-get
for packages, I have never had to compile/build/configure Qt or anything MySQL. Did the change requiring needing to build MySQL plug-in come in at 19.10? -
Did you re-run configure from a clean state ? If not, as suggested in the summary, you should clean the sources if you called configure it.
Better yet, do an out of source build so that you can just nuke the build folder to restart fresh.
If it is still failing, then check the test logs to see exactly why the detection failed.
@SGaist Thanks, I uninstalled everything using the maintenance tool and then reinstalled again using, as usual, the offline installer.
I run./configure -sql-mysql
as first command and finally there was "yes" near "MySql" and the process ended well.In the previous attempt I had already run
./configure
before./configure -sql-mysql
without cleaning, was that the problem in your opinion? -
@jsulm said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
@JonB Did you use Qt provided by the distribution?
Yes, absolutely, the Qt 5.12.2 which came with Ubuntu 19.04 was adequate for me. I didn't see anything in OP's question which said he had built Qt for himself. Given that, I have never had to build/configure Qt, any the libraries to hook Qt to MySQL also come from
apt-get
. Hence why I was asking whether that will have changed at 19.10? Because if so I shall not be moving off 19.04 till I have to, hence my question.... -
@SGaist Thanks, I uninstalled everything using the maintenance tool and then reinstalled again using, as usual, the offline installer.
I run./configure -sql-mysql
as first command and finally there was "yes" near "MySql" and the process ended well.In the previous attempt I had already run
./configure
before./configure -sql-mysql
without cleaning, was that the problem in your opinion?@enne9 said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
In the previous attempt I had already run ./configure before ./configure -sql-mysql without cleaning, was that the problem in your opinion?
Yes, as suggested in the summary message, if you changed something like adding a new dependency library and re-run configure, you have to clean before calling configure again.
But as I already wrote, out of source builds are way simpler to handle that kind use case. You keep the sources clean and can nuke easily the faulty build/configure to start anew.
-
@jsulm said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
@JonB Did you use Qt provided by the distribution?
Yes, absolutely, the Qt 5.12.2 which came with Ubuntu 19.04 was adequate for me. I didn't see anything in OP's question which said he had built Qt for himself. Given that, I have never had to build/configure Qt, any the libraries to hook Qt to MySQL also come from
apt-get
. Hence why I was asking whether that will have changed at 19.10? Because if so I shall not be moving off 19.04 till I have to, hence my question....@JonB said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
he had built Qt for himself
It applies to Qt installed via installer as well
-
@JonB said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
he had built Qt for himself
It applies to Qt installed via installer as well
It applies to Qt installed via installer as well
Hmm, I've never done that. Only ever
apt-get
. I hope I'm not hijacking (tell me if I am), but let's put it this way: if I move to a newer Ubuntu, and I want the Qt and thelibqtmysql
stuff as supplied with distro viaapt-get
, can I still do that (absolutely no compiling/building/configuring of either), or at 19.10+ has something been removed which means it won't work any longer? -
It applies to Qt installed via installer as well
Hmm, I've never done that. Only ever
apt-get
. I hope I'm not hijacking (tell me if I am), but let's put it this way: if I move to a newer Ubuntu, and I want the Qt and thelibqtmysql
stuff as supplied with distro viaapt-get
, can I still do that (absolutely no compiling/building/configuring of either), or at 19.10+ has something been removed which means it won't work any longer?@JonB said in Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?:
can I still do that
Yes, the prebuild Qt provided by Ubuntu should have everything you need (but I did not yet use any of 19.x Ubuntu).