QMYSQL driver not loaded on mac
-
@edwinxxxx Please tell us the exact step your executing when you get that error message
-
@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? -
@edwinxxxx so it's now working correctly ?
-
@sgaist
platform: macos 10.14
mysql 8.0.17
qt 5.9.8firstly 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. -
@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
-
@edwinxxxx "/opt" is a system folder just under root /
-
@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
-
@edwinxxxx So, it is in /usr/local, not /opt/local.
-
@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
-
@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.