Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMYSQL driver: Anaconda / Linux

QMYSQL driver: Anaconda / Linux

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 950 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    Jamie Allen
    wrote on last edited by
    #1

    Kia ora

    I've read so many helpful articles on the oft-encountered issue of libqsqlmysql.so and the QMYSQL driver not being found. Thank you for the support that these have been.

    I'm not able to sort this current scenario and wonder if anyone can advise?
    I am attempting to achieve this with Linux and Anaconda (for reasons too boring to go into unless these are of interest!). Anaconda has a pyqt5 package, which is awesome.

    I have compiled and installed libqsqlmysql.so from the matching version of QT (5.9.7) - however, it throws this error:

    python: symbol lookup error: /opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so: undefined symbol: _ZdlPvm, version Qt_5

    I've had a thorough search, but have not been able to find a similar case, and wonder if anyone has the genius to point me in the right direction for a fix. Many hours fruitlessly trying to fix it myself to no avail.

    Interestingly, just prior to throwing this error:
    q.exec()
    TypeError: exec(self, str): not enough arguments

    (the call being to execute a prepared query).

    Very hopeful for any help here...

    Thank you,

    Jamie

    JonBJ 1 Reply Last reply
    0
    • J Jamie Allen

      Kia ora

      I've read so many helpful articles on the oft-encountered issue of libqsqlmysql.so and the QMYSQL driver not being found. Thank you for the support that these have been.

      I'm not able to sort this current scenario and wonder if anyone can advise?
      I am attempting to achieve this with Linux and Anaconda (for reasons too boring to go into unless these are of interest!). Anaconda has a pyqt5 package, which is awesome.

      I have compiled and installed libqsqlmysql.so from the matching version of QT (5.9.7) - however, it throws this error:

      python: symbol lookup error: /opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so: undefined symbol: _ZdlPvm, version Qt_5

      I've had a thorough search, but have not been able to find a similar case, and wonder if anyone has the genius to point me in the right direction for a fix. Many hours fruitlessly trying to fix it myself to no avail.

      Interestingly, just prior to throwing this error:
      q.exec()
      TypeError: exec(self, str): not enough arguments

      (the call being to execute a prepared query).

      Very hopeful for any help here...

      Thank you,

      Jamie

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Jamie-Allen
      Are you needing to compile Qt/MySql support from sources for yourself? You don't say anything about which Linux distro you are using, I have always used the version of Qt which comes with Ubuntu release and have fetched anything I need via apt-get, no sources/compilation of anything.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jamie Allen
        wrote on last edited by
        #3

        Thanks, Jon - really appreciate your swift response :))

        The distro is Ubuntu 20.04.1 - and it does indeed come with a packaged version of the library. Curiously, when I've attempted using that library:

        "Failed to extract plugin meta data from '/opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so'"
        not a plugin
        QSqlDatabase: QMYSQL driver not loaded

        Thank you again, Jamie

        J 1 Reply Last reply
        0
        • J Jamie Allen

          Thanks, Jon - really appreciate your swift response :))

          The distro is Ubuntu 20.04.1 - and it does indeed come with a packaged version of the library. Curiously, when I've attempted using that library:

          "Failed to extract plugin meta data from '/opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so'"
          not a plugin
          QSqlDatabase: QMYSQL driver not loaded

          Thank you again, Jamie

          J Offline
          J Offline
          Jamie Allen
          wrote on last edited by
          #4

          @Jamie-Allen said in QMYSQL driver: Anaconda / Linux:

          Thanks, Jon - really appreciate your swift response :))

          The distro is Ubuntu 20.04.1 - and it does indeed come with a packaged version of the library. Curiously, when I've attempted using that library:

          "Failed to extract plugin meta data from '/opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so'"
          not a plugin
          QSqlDatabase: QMYSQL driver not loaded

          Thank you again, Jamie

          PS - Still more interestingly, if I use the apt-installed version of Python (rather than Anaconda's version), that library works quite happily (but for this application, sadly I have to use Anaconda). Here's the debug output - demonstrating that the meta data most definitely present:

          QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so"
          Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so, metadata=
          {
          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
          "MetaData": {
          "Keys": [
          "QMYSQL3",
          "QMYSQL"
          ]
          },
          "archreq": 0,
          "className": "QMYSQLDriverPlugin",
          "debug": false,
          "version": 330752
          }

          I guess it's a library incompatibility problem :(
          With thanks again, Jamie

          J 1 Reply Last reply
          0
          • J Jamie Allen

            @Jamie-Allen said in QMYSQL driver: Anaconda / Linux:

            Thanks, Jon - really appreciate your swift response :))

            The distro is Ubuntu 20.04.1 - and it does indeed come with a packaged version of the library. Curiously, when I've attempted using that library:

            "Failed to extract plugin meta data from '/opt/anaconda3/plugins/sqldrivers/libqsqlmysql.so'"
            not a plugin
            QSqlDatabase: QMYSQL driver not loaded

            Thank you again, Jamie

            PS - Still more interestingly, if I use the apt-installed version of Python (rather than Anaconda's version), that library works quite happily (but for this application, sadly I have to use Anaconda). Here's the debug output - demonstrating that the meta data most definitely present:

            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so, metadata=
            {
            "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
            "MetaData": {
            "Keys": [
            "QMYSQL3",
            "QMYSQL"
            ]
            },
            "archreq": 0,
            "className": "QMYSQLDriverPlugin",
            "debug": false,
            "version": 330752
            }

            I guess it's a library incompatibility problem :(
            With thanks again, Jamie

            J Offline
            J Offline
            Jamie Allen
            wrote on last edited by
            #5

            Ha! Joy!

            Just solved this by using Anaconda's qmake rather than the qt-installed qmake. Doh!

            The exec() issue fixed by using exec_()

            Thanks again for your time, Jamie

            JonBJ 1 Reply Last reply
            0
            • J Jamie Allen

              Ha! Joy!

              Just solved this by using Anaconda's qmake rather than the qt-installed qmake. Doh!

              The exec() issue fixed by using exec_()

              Thanks again for your time, Jamie

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @Jamie-Allen

              Thanks again for your time, Jamie

              Thanking yourself in a post is the first sign of madness :)

              exec() should be acceptable at least in PyQt. I guess you're using PySide if it insists on exec_()? I thought they might have allowed for that by now....

              J 1 Reply Last reply
              0
              • JonBJ JonB

                @Jamie-Allen

                Thanks again for your time, Jamie

                Thanking yourself in a post is the first sign of madness :)

                exec() should be acceptable at least in PyQt. I guess you're using PySide if it insists on exec_()? I thought they might have allowed for that by now....

                J Offline
                J Offline
                Jamie Allen
                wrote on last edited by
                #7

                @JonB :))) I was actually thanking you! That's the bizarre thing... I'm not using PySide. Very odd.

                However, at least it's working. Currently attempting the same on Mac as the application has to deployed on that platform too (and also with Anaconda)... Similar issues there, and I'll update if/when I'm able to find a solution, for anyone trying the same process...
                Jamie :)

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved