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 not loaded on mac
Forum Updated to NodeBB v4.3 + New Features

QMYSQL driver not loaded on mac

Scheduled Pinned Locked Moved Solved General and Desktop
mysqlmac os xqt5.9.1
43 Posts 7 Posters 25.5k Views 3 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.
  • E edwinxxxx

    @jsulm thanks for your tips.i have wasted the whole day to solve it😂

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

    @edwinxxxx so it's now working correctly ?

    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
    0
    • SGaistS SGaist

      @edwinxxxx so it's now working correctly ?

      E Offline
      E Offline
      edwinxxxx
      wrote on last edited by edwinxxxx
      #33

      @sgaist
      platform: macos 10.14
      mysql 8.0.17
      qt 5.9.8

      firstly i run

      //otool -L libqsqlmysql.dylib
      

      but it shows

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'libqsqlmysql.dylib': No such file or directory
      

      how can i find the path like "opt/local..." on my machine?
      thanks man.

      jsulmJ 1 Reply Last reply
      0
      • E edwinxxxx

        @sgaist
        platform: macos 10.14
        mysql 8.0.17
        qt 5.9.8

        firstly i run

        //otool -L libqsqlmysql.dylib
        

        but it shows

        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'libqsqlmysql.dylib': No such file or directory
        

        how can i find the path like "opt/local..." on my machine?
        thanks man.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #34

        @edwinxxxx said in QMYSQL driver not loaded on mac:

        how can i find the path like "opt/local..." on my machine?

        find / -name libqsqlmysql.dylib
        

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

        E 1 Reply Last reply
        0
        • jsulmJ jsulm

          @edwinxxxx said in QMYSQL driver not loaded on mac:

          how can i find the path like "opt/local..." on my machine?

          find / -name libqsqlmysql.dylib
          
          E Offline
          E Offline
          edwinxxxx
          wrote on last edited by
          #35

          @jsulm sorry, i still cant find any folder whose name begin with "/opt/local..."

          0_1564726030510_屏幕快照 2019-08-02 14.07.02.png

          jsulmJ 1 Reply Last reply
          0
          • E edwinxxxx

            @jsulm sorry, i still cant find any folder whose name begin with "/opt/local..."

            0_1564726030510_屏幕快照 2019-08-02 14.07.02.png

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #36

            @edwinxxxx "/opt" is a system folder just under root /

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

            E 1 Reply Last reply
            0
            • jsulmJ jsulm

              @edwinxxxx "/opt" is a system folder just under root /

              E Offline
              E Offline
              edwinxxxx
              wrote on last edited by
              #37

              @jsulm is that mean i cant locate the file "libmysqlclient.xx.dylib" in my pc?

              jsulmJ 1 Reply Last reply
              0
              • E edwinxxxx

                @jsulm is that mean i cant locate the file "libmysqlclient.xx.dylib" in my pc?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #38

                @edwinxxxx No, it doesn't mean that. If it is somewhere on your machine you can find it.
                Where did you install it?
                Did you try what I suggested?

                find / -name libmysqlclient.*.dylib
                

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

                E 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @edwinxxxx No, it doesn't mean that. If it is somewhere on your machine you can find it.
                  Where did you install it?
                  Did you try what I suggested?

                  find / -name libmysqlclient.*.dylib
                  
                  E Offline
                  E Offline
                  edwinxxxx
                  wrote on last edited by
                  #39

                  @jsulm Yes! it shows a lot of contents, and the related information is
                  0_1564727625430_屏幕快照 2019-08-02 14.32.18.png

                  jsulmJ 1 Reply Last reply
                  0
                  • E edwinxxxx

                    @jsulm Yes! it shows a lot of contents, and the related information is
                    0_1564727625430_屏幕快照 2019-08-02 14.32.18.png

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #40

                    @edwinxxxx So, it is in /usr/local, not /opt/local.

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

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      edwinxxxx
                      wrote on last edited by edwinxxxx
                      #41

                      @jsulm when i call "otool -L " it indicates that

                      libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
                      	@rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.9.0, current version 5.9.8)
                      	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.9.0, current version 5.9.8)
                      	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
                      	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
                      	/usr/local/mysql/lib/libmysqlclient.20.dylib (compatibility version 20.0.0, current version 20.0.0)
                      	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
                      	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
                      

                      so according to other's experience i run

                      install_name_tool -change/usr/local/mysql/lib/libmysqlclient.20.dylib/usr/local/mysql-8.0.17-macos10.14-x86_64/lib/libmysqlclient.21.dylib/Users/edwinxxxx/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                      

                      however,it seems didn't work still.

                      Usage: /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
                      
                      jsulmJ 1 Reply Last reply
                      0
                      • E edwinxxxx

                        @jsulm when i call "otool -L " it indicates that

                        libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
                        	@rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.9.0, current version 5.9.8)
                        	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.9.0, current version 5.9.8)
                        	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
                        	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
                        	/usr/local/mysql/lib/libmysqlclient.20.dylib (compatibility version 20.0.0, current version 20.0.0)
                        	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
                        	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
                        

                        so according to other's experience i run

                        install_name_tool -change/usr/local/mysql/lib/libmysqlclient.20.dylib/usr/local/mysql-8.0.17-macos10.14-x86_64/lib/libmysqlclient.21.dylib/Users/edwinxxxx/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                        

                        however,it seems didn't work still.

                        Usage: /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
                        
                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #42

                        @edwinxxxx said in QMYSQL driver not loaded on mac:

                        install_name_tool -change/usr/local/mysql/lib/libmysqlclient.20.dylib/usr/local/mysql-8.0.17-macos10.14-x86_64/lib/libmysqlclient.21.dylib/Users/edwinxxxx/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib

                        I'm really not an MacOS expert, but don't you miss spaces here? Everything adter -change is one string without any separation via spaces.

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

                        E 1 Reply Last reply
                        1
                        • jsulmJ jsulm

                          @edwinxxxx said in QMYSQL driver not loaded on mac:

                          install_name_tool -change/usr/local/mysql/lib/libmysqlclient.20.dylib/usr/local/mysql-8.0.17-macos10.14-x86_64/lib/libmysqlclient.21.dylib/Users/edwinxxxx/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib

                          I'm really not an MacOS expert, but don't you miss spaces here? Everything adter -change is one string without any separation via spaces.

                          E Offline
                          E Offline
                          edwinxxxx
                          wrote on last edited by
                          #43

                          @jsulm woooow! i add the spaces and the error disappear!
                          REALLY REALLY thanks!!!!

                          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