QMYSQL : Driver not loaded
-
@SGaist said in QMYSQL : Driver not loaded:
otool -L libqsqlmysql.dylib
Thank you for the reply!
trav$ otool -L libqsqlmysql.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'libqsqlmysql.dylib': No such file or directory.
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed -
otool -L /path/to/location/of/libqsqlmysql.dylib
-
trav$ otool -L /usr/local/Cellar/mysql/5.7.17/lib/libmysqlclient.dylib
/usr/local/Cellar/mysql/5.7.17/lib/libmysqlclient.dylib:
/usr/local/opt/mysql/lib/libmysqlclient.20.dylib (compatibility version 20.0.0, current version 20.0.0)
/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0) -
I'm asking you to run otool on the Qt MySQL plugin. The path I've used in the command samples are meant to be replaced by the actual path to where the plugin is located. I don't know where it is on your system, so don't just copy paste the command, update it as well.
-
I'm asking you to run otool on the Qt MySQL plugin. The path I've used in the command samples are meant to be replaced by the actual path to where the plugin is located. I don't know where it is on your system, so don't just copy paste the command, update it as well.
@SGaist Sorry was 3 am. Deleted that comment as soon as I knew what I did I updated it immediately though with the correct path ^
trav$ otool -L /usr/local/Cellar/mysql/5.7.17/lib/libmysqlclient.dylib
/usr/local/Cellar/mysql/5.7.17/lib/libmysqlclient.dylib:
/usr/local/opt/mysql/lib/libmysqlclient.20.dylib (compatibility version 20.0.0, current version 20.0.0)
/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0) -
Not the MySQL client library, the Qt MySQL plugiin libqsqlmysql.dylib that can be found in the
plugins/sqldrivers
folder in your Qt installation. -
Not the MySQL client library, the Qt MySQL plugiin libqsqlmysql.dylib that can be found in the
plugins/sqldrivers
folder in your Qt installation.@SGaist
pwd
/Users/trav/Qt/5.6/clang_64/plugins/sqldriverstrav$ otool -L libqsqlmysql.dylib
libqsqlmysql.dylib:
libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
@rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.0)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
Traviss-Air:sqldrivers trav$ -
@SGaist
pwd
/Users/trav/Qt/5.6/clang_64/plugins/sqldriverstrav$ otool -L libqsqlmysql.dylib
libqsqlmysql.dylib:
libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
@rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.0)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
Traviss-Air:sqldrivers trav$@Trav said in QMYSQL : Driver not loaded:
@SGaist
pwd
/Users/trav/Qt/5.6/clang_64/plugins/sqldriverstrav$ otool -L libqsqlmysql.dylib
libqsqlmysql.dylib:
libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)Here's your problem... It is looking for mysql in the /opt/local/lib directory (which is a weird directory), when according to your post above it is in /usr/local/opt/mysql.
Usually people use /usr/local or /opt. I've never seen /opt/local. But it's not like there's set rules for directories or anything, so to each their own.
Anyway use
otool
to fix those paths and it should work. -
It's not weird for tools that are external to the distribution if we talk Linux style.
In this case, it's macports that is using it like that.
In any cas, the parameters passed to install_name_tool must be correct there's no error message telling you that the paths are invalid.