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. same problem but QPSQL DRIVER NOT LOADED
Forum Updated to NodeBB v4.3 + New Features

same problem but QPSQL DRIVER NOT LOADED

Scheduled Pinned Locked Moved Solved General and Desktop
27 Posts 4 Posters 3.8k 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.
  • 1 12bibi12

    @JonB I got this: Detected system locale encoding (US-ASCII, locale "C") is not UTF-8.
    Qt shall use a UTF-8 locale ("UTF-8") instead. If this causes problems,
    reconfigure your locale. See the locale(1) manual for more information.
    qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers" ...
    qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib"
    qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib, metadata=
    {
    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
    "MetaData": {
    "Keys": [
    "QSQLITE"
    ]
    },
    "archlevel": 0,
    "className": "QSQLiteDriverPlugin",
    "debug": false,
    "version": 394240
    }

    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QSQLITE")
    qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib"
    qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib, metadata=
    {
    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
    "MetaData": {
    "Keys": [
    "QODBC"
    ]
    },
    "archlevel": 0,
    "className": "QODBCDriverPlugin",
    "debug": false,
    "version": 394240
    }

    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QODBC")
    qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib"
    qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib, metadata=
    {
    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
    "MetaData": {
    "Keys": [
    "QPSQL"
    ]
    },
    "archlevel": 0,
    "className": "QPSQLDriverPlugin",
    "debug": false,
    "version": 394240
    }

    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QPSQL")
    qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/testing.app/Contents/MacOS/sqldrivers" ...
    qt.core.library: "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" cannot load: Cannot load library /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib: (dlopen(/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib, 0x0085): Library not loaded: /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib
    Referenced from: <24BC2DDB-7D4E-30A3-A970-DD116917D15D> /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib
    Reason: tried: '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtWidgets.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtWidgets.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtSql.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtSql.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtGui.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtGui.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtCore.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtCore.framework/Versions/A/libpq.5.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5_debug.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5_debug.dylib' (no such file, not in dyld cache), '/usr/lib/libpq.5.dylib' (no such file, not in dyld cache))
    qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" : "Cannot load library /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib: (dlopen(/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib, 0x0085): Library not loaded: /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib\n Referenced from: <24BC2DDB-7D4E-30A3-A970-DD116917D15D> /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib\n Reason: tried: '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtWidgets.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtWidgets.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtSql.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtSql.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtGui.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtGui.framework/Versions/A/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/libpq.5.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtCore.framework/Versions/A/libpq.5_debug.dylib' (no such file), '/Users/hayssamalsaffar/Qt/6.4.3/macos/lib/QtCore.framework/Versions/A/libpq.5.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5_debug.dylib' (no such file), '/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5_debug.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5_debug.dylib' (no such file, not in dyld cache), '/usr/lib/libpq.5.dylib' (no such file, not in dyld cache))"
    QSqlDatabase: QPSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC QPSQL
    "Driver not loaded Driver not loaded"

    SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #16

    Do you have PostgreSQL installed in some fashion ?
    If so, how and where did you install it ?

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

    1 1 Reply Last reply
    0
    • SGaistS SGaist

      Do you have PostgreSQL installed in some fashion ?
      If so, how and where did you install it ?

      1 Offline
      1 Offline
      12bibi12
      wrote on last edited by
      #17

      @SGaist i have something named postgre https://postgresapp.com. its installed in my applications. /Applications/Postgres.app/Contents

      SGaistS 1 Reply Last reply
      0
      • 1 12bibi12

        @SGaist i have something named postgre https://postgresapp.com. its installed in my applications. /Applications/Postgres.app/Contents

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #18

        From the debug log, I would guess that you installed the 15 version of the application.

        You have two options here:

        • Install version 14
        • Use install_name_tool to update the /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib path to use the library from your installed Postgres.app

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

        1 1 Reply Last reply
        0
        • SGaistS SGaist

          From the debug log, I would guess that you installed the 15 version of the application.

          You have two options here:

          • Install version 14
          • Use install_name_tool to update the /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib path to use the library from your installed Postgres.app
          1 Offline
          1 Offline
          12bibi12
          wrote on last edited by
          #19

          @SGaist i dont know exactly how to use install_name_tool.

          do I write in my command install_name_tool with the path? I have never used it

          1 Reply Last reply
          0
          • 1 Offline
            1 Offline
            12bibi12
            wrote on last edited by
            #20

            @SGaist I tried instead installing version 14 but I got same error

            SGaistS 1 Reply Last reply
            0
            • 1 12bibi12

              @SGaist I tried instead installing version 14 but I got same error

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #21

              Did you check that ˋ/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylibˋ exists ?

              As for ˋinstall_name_tool`, please read its help. It's really not complicated to replace a path with another one.

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

              1 1 Reply Last reply
              0
              • SGaistS SGaist

                Did you check that ˋ/Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylibˋ exists ?

                As for ˋinstall_name_tool`, please read its help. It's really not complicated to replace a path with another one.

                1 Offline
                1 Offline
                12bibi12
                wrote on last edited by
                #22

                @SGaist I wrote this install_name_tool -change /Applications/Postgres.app/Contents/Versions/15/lib/libpq.5.dylib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib
                and got this:
                /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input

                SGaistS 1 Reply Last reply
                0
                • 1 12bibi12

                  @SGaist I wrote this install_name_tool -change /Applications/Postgres.app/Contents/Versions/15/lib/libpq.5.dylib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib
                  and got this:
                  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #23

                  -change takes three arguments: old path, new path, file you want to change.

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

                  1 2 Replies Last reply
                  0
                  • SGaistS SGaist

                    -change takes three arguments: old path, new path, file you want to change.

                    1 Offline
                    1 Offline
                    12bibi12
                    wrote on last edited by
                    #24

                    @SGaist I get this: error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: libpq.5.dylib (No such file or directory)

                    i have checked in /Applications/Postgres.app/Contents/Versions/15/ and I have libpq5.dylib

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      -change takes three arguments: old path, new path, file you want to change.

                      1 Offline
                      1 Offline
                      12bibi12
                      wrote on last edited by
                      #25

                      @SGaist i made some changes and installed postgre 14 and got this instead. qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers" ...
                      qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib"
                      qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib, metadata=
                      {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                      "Keys": [
                      "QSQLITE"
                      ]
                      },
                      "archlevel": 0,
                      "className": "QSQLiteDriverPlugin",
                      "debug": false,
                      "version": 394240
                      }

                      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QSQLITE")
                      qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib"
                      qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib, metadata=
                      {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                      "Keys": [
                      "QODBC"
                      ]
                      },
                      "archlevel": 0,
                      "className": "QODBCDriverPlugin",
                      "debug": false,
                      "version": 394240
                      }

                      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QODBC")
                      qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib"
                      qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib, metadata=
                      {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                      "Keys": [
                      "QPSQL"
                      ]
                      },
                      "archlevel": 0,
                      "className": "QPSQLDriverPlugin",
                      "debug": false,
                      "version": 394240
                      }

                      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QPSQL")
                      qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/testing.app/Contents/MacOS/sqldrivers" ...
                      qt.core.library: "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" loaded library
                      "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" unloaded library (faked)

                      i dont if this is a step forward or step back

                      SGaistS 1 Reply Last reply
                      0
                      • 1 12bibi12

                        @SGaist i made some changes and installed postgre 14 and got this instead. qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers" ...
                        qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib"
                        qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlite.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QSQLITE"
                        ]
                        },
                        "archlevel": 0,
                        "className": "QSQLiteDriverPlugin",
                        "debug": false,
                        "version": 394240
                        }

                        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QSQLITE")
                        qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib"
                        qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlodbc.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QODBC"
                        ]
                        },
                        "archlevel": 0,
                        "className": "QODBCDriverPlugin",
                        "debug": false,
                        "version": 394240
                        }

                        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QODBC")
                        qt.core.plugin.factoryloader: looking at "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib"
                        qt.core.plugin.loader: Found metadata in lib /Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QPSQL"
                        ]
                        },
                        "archlevel": 0,
                        "className": "QPSQLDriverPlugin",
                        "debug": false,
                        "version": 394240
                        }

                        qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QPSQL")
                        qt.core.plugin.factoryloader: checking directory path "/Users/hayssamalsaffar/build-testing-Qt_6_4_3_for_macOS-Debug/testing.app/Contents/MacOS/sqldrivers" ...
                        qt.core.library: "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" loaded library
                        "/Users/hayssamalsaffar/Qt/6.4.3/macos/plugins/sqldrivers/libqsqlpsql.dylib" unloaded library (faked)

                        i dont if this is a step forward or step back

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #26

                        Looks like the plugin is loaded so you are good to go.

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

                        1 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Looks like the plugin is loaded so you are good to go.

                          1 Offline
                          1 Offline
                          12bibi12
                          wrote on last edited by
                          #27

                          @SGaist Thank you

                          1 Reply Last reply
                          0
                          • 1 12bibi12 has marked this topic as solved on

                          • Login

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