Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Simplest way to install Qt in Ubuntu (19.10) with MySQL driver?

    Installation and Deployment
    4
    28
    1990
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      enne9 last edited by

      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

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @enne9 last edited by JonB

        @enne9
        Have you installed libqt5sql5-mysql, https://packages.ubuntu.com/disco/libqt5sql5-mysql ? (Do through apt-get.)

        Otherwise if it used to work and has stopped, you could ldd the library .so files, and from docs

        To 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.

        E 1 Reply Last reply Reply Quote 2
        • E
          enne9 @JonB last edited by enne9

          @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 proposing QMYSQL:

          QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
          
          JonB jsulm 2 Replies Last reply Reply Quote 0
          • JonB
            JonB @enne9 last edited by

            @enne9
            Do the QT_DEBUG_PLUGINS as per previous post.

            E 1 Reply Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @enne9 last edited by

              @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.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              E JonB 2 Replies Last reply Reply Quote 2
              • E
                enne9 @JonB last edited by

                @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)
                
                1 Reply Last reply Reply Quote 0
                • E
                  enne9 @jsulm last edited by enne9

                  @jsulm This is part of the output when I just run ./configure. Why is there no "yes" near "MySql"?
                  configure.png

                  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?

                  1 Reply Last reply Reply Quote 0
                  • E
                    enne9 last edited by

                    @jsulm any suggestion?

                    jsulm 1 Reply Last reply Reply Quote 0
                    • jsulm
                      jsulm Lifetime Qt Champion @enne9 last edited by

                      @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...

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      E 1 Reply Last reply Reply Quote 1
                      • E
                        enne9 @jsulm last edited by

                        @jsulm there is no libmysql-dev package, I instead installed libmysqlclient-dev.
                        The error I am getting is still

                        ERROR: 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.

                        jsulm 1 Reply Last reply Reply Quote 0
                        • SGaist
                          SGaist Lifetime Qt Champion last edited by

                          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.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          E 1 Reply Last reply Reply Quote 2
                          • jsulm
                            jsulm Lifetime Qt Champion @enne9 last edited by

                            @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?

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply Reply Quote 0
                            • JonB
                              JonB @jsulm last edited by

                              @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 1 Reply Last reply Reply Quote 0
                              • jsulm
                                jsulm Lifetime Qt Champion @JonB last edited by

                                @JonB Did you use Qt provided by the distribution?

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                JonB 1 Reply Last reply Reply Quote 0
                                • E
                                  enne9 @SGaist last edited by

                                  @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?

                                  SGaist 1 Reply Last reply Reply Quote 0
                                  • JonB
                                    JonB @jsulm last edited by JonB

                                    @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....

                                    jsulm 1 Reply Last reply Reply Quote 0
                                    • SGaist
                                      SGaist Lifetime Qt Champion @enne9 last edited by

                                      @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.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply Reply Quote 2
                                      • jsulm
                                        jsulm Lifetime Qt Champion @JonB last edited by

                                        @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

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        JonB 1 Reply Last reply Reply Quote 0
                                        • JonB
                                          JonB @jsulm last edited by JonB

                                          @jsulm

                                          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 the libqtmysql stuff as supplied with distro via apt-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?

                                          jsulm 1 Reply Last reply Reply Quote 0
                                          • jsulm
                                            jsulm Lifetime Qt Champion @JonB last edited by

                                            @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).

                                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                                            JonB 1 Reply Last reply Reply Quote 2
                                            • First post
                                              Last post