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. Postgresql plugin
Qt 6.11 is out! See what's new in the release blog

Postgresql plugin

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.9k 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
    johnmerlino
    wrote on last edited by
    #1

    I have qt installed on osx and I have postgresql installed. Unfortunately, when trying to run executable, I get the following error:

    QSqlDatabase: QPSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC

    It seems like the qpsql plugin for qt is not installed or available.

    $ qmake -query | grep plugins
    QT_INSTALL_PLUGINS:/usr/local/Cellar/qt/4.8.3/plugins
    cd /usr/local/Cellar/qt/4.8.3/plugins/sqldrivers
    $ ls
    libqsqlite.dylib libqsqlodbc.dylib libqsqlpsql.dylib

    How do I get the psql plugin installed?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What does otool -L libqsqlpsql.dylib return ?

      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
      0
      • J Offline
        J Offline
        johnmerlino
        wrote on last edited by
        #3

        @SGaist

        It returns the following:

        $ otool -L libqsqlpsql.dylib
        libqsqlpsql.dylib:
        libqsqlpsql.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.3.0)
        /usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
        /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Looks right, but one thing that I find strange is that it's not listed in the available plugins.

          Can you do the same on the other two plugins ?

          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
          0
          • J Offline
            J Offline
            johnmerlino
            wrote on last edited by
            #5

            @SGaist, this is the output for the other two plugins:

            $ otool -L libqsqlite.dylib
            libqsqlite.dylib:
            libqsqlite.dylib (compatibility version 0.0.0, current version 0.0.0)
            /usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
            /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
            /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)

            otool -L libqsqlodbc.dylib
            libqsqlodbc.dylib:
            libqsqlodbc.dylib (compatibility version 0.0.0, current version 0.0.0)
            /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.18.0)
            /usr/local/Cellar/qt/4.8.3/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.3)
            /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
            /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Ok, still looking good.

              What does lastError return ?

              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
              0

              • Login

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