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 22.7k 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 Offline
    E Offline
    edwinxxxx
    wrote on 1 Aug 2019, 08:16 last edited by edwinxxxx 8 Jan 2019, 08:19
    #25

    Hi, what i have done are as pervious.but it shows that

    //-bash: /Users/lucas/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: cannot execute binary file"
    

    how can i fix it? thx for your help:)

    J 1 Reply Last reply 1 Aug 2019, 08:22
    0
    • E edwinxxxx
      1 Aug 2019, 08:16

      Hi, what i have done are as pervious.but it shows that

      //-bash: /Users/lucas/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: cannot execute binary file"
      

      how can i fix it? thx for your help:)

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 1 Aug 2019, 08:22 last edited by
      #26

      @edwinxxxx said in QMYSQL driver not loaded on mac:

      /Users/lucas/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib

      You can't execute a library.
      What are you trying to do?

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

      E 1 Reply Last reply 1 Aug 2019, 08:29
      0
      • J jsulm
        1 Aug 2019, 08:22

        @edwinxxxx said in QMYSQL driver not loaded on mac:

        /Users/lucas/Qt5.9.8/5.9.8/clang_64/plugins/sqldrivers/libqsqlmysql.dylib

        You can't execute a library.
        What are you trying to do?

        E Offline
        E Offline
        edwinxxxx
        wrote on 1 Aug 2019, 08:29 last edited by edwinxxxx 8 Jan 2019, 08:31
        #27

        @jsulm coz mysql driver can't be loaded in qt creator , i followed the directions above which has been proved that it was a successful way to solve the problem.but error happens.

        J 1 Reply Last reply 1 Aug 2019, 08:31
        0
        • E edwinxxxx
          1 Aug 2019, 08:29

          @jsulm coz mysql driver can't be loaded in qt creator , i followed the directions above which has been proved that it was a successful way to solve the problem.but error happens.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 1 Aug 2019, 08:31 last edited by
          #28

          @edwinxxxx Please tell us the exact step your executing when you get that error message

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

          E 1 Reply Last reply 1 Aug 2019, 08:40
          0
          • J jsulm
            1 Aug 2019, 08:31

            @edwinxxxx Please tell us the exact step your executing when you get that error message

            E Offline
            E Offline
            edwinxxxx
            wrote on 1 Aug 2019, 08:40 last edited by
            #29

            @jsulm 0_1564648798567_屏幕快照 2019-08-01 16.34.23.png

            J 1 Reply Last reply 1 Aug 2019, 08:43
            0
            • E edwinxxxx
              1 Aug 2019, 08:40

              @jsulm 0_1564648798567_屏幕快照 2019-08-01 16.34.23.png

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 1 Aug 2019, 08:43 last edited by
              #30

              @edwinxxxx The last thig you did does not make sense: you're trying to execute a lib.
              The first one was not successful - you called it in a wrong way. Take a look at its output ("Usage:"), it explains how to call it.
              @SGaist - you're the Mac expert, can you take a look?

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

              1 Reply Last reply
              1
              • E Offline
                E Offline
                edwinxxxx
                wrote on 1 Aug 2019, 08:51 last edited by
                #31

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

                S 1 Reply Last reply 1 Aug 2019, 13:26
                0
                • E edwinxxxx
                  1 Aug 2019, 08:51

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

                  S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 1 Aug 2019, 13:26 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 2 Aug 2019, 01:19
                  0
                  • S SGaist
                    1 Aug 2019, 13:26

                    @edwinxxxx so it's now working correctly ?

                    E Offline
                    E Offline
                    edwinxxxx
                    wrote on 2 Aug 2019, 01:19 last edited by edwinxxxx 8 Feb 2019, 01:29
                    #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.

                    J 1 Reply Last reply 2 Aug 2019, 04:15
                    0
                    • 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

                                        34/43

                                        2 Aug 2019, 04:15

                                        • Login

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