QMYSQL driver not loaded on mac
-
@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.