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
QtWS25 Last Chance

QMYSQL driver not loaded on mac

Scheduled Pinned Locked Moved Solved General and Desktop
mysqlmac os xqt5.9.1
43 Posts 7 Posters 22.6k Views
  • 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
    2 Aug 2019, 01:19

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

    J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 2 Aug 2019, 04:15 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 2 Aug 2019, 06:07
    0
    • J jsulm
      2 Aug 2019, 04:15

      @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 2 Aug 2019, 06:07 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

      J 1 Reply Last reply 2 Aug 2019, 06:10
      0
      • E edwinxxxx
        2 Aug 2019, 06:07

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

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

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 2 Aug 2019, 06:10 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 2 Aug 2019, 06:20
        0
        • J jsulm
          2 Aug 2019, 06:10

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

          E Offline
          E Offline
          edwinxxxx
          wrote on 2 Aug 2019, 06:20 last edited by
          #37

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

          J 1 Reply Last reply 2 Aug 2019, 06:22
          0
          • E edwinxxxx
            2 Aug 2019, 06:20

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

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 2 Aug 2019, 06:22 last edited by jsulm 8 Feb 2019, 06:23
            #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 2 Aug 2019, 06:33
            0
            • J jsulm
              2 Aug 2019, 06:22

              @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 2 Aug 2019, 06:33 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

              J 1 Reply Last reply 2 Aug 2019, 06:37
              0
              • E edwinxxxx
                2 Aug 2019, 06:33

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

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 2 Aug 2019, 06:37 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 2 Aug 2019, 06:45 last edited by edwinxxxx 8 Feb 2019, 06:48
                  #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
                  
                  J 1 Reply Last reply 2 Aug 2019, 06:53
                  0
                  • E edwinxxxx
                    2 Aug 2019, 06:45

                    @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
                    
                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 2 Aug 2019, 06:53 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 2 Aug 2019, 07:01
                    1
                    • J jsulm
                      2 Aug 2019, 06:53

                      @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 2 Aug 2019, 07:01 last edited by
                      #43

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

                      1 Reply Last reply
                      0

                      43/43

                      2 Aug 2019, 07:01

                      • Login

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