QMYSQL : Driver not loaded
-
wrote on 26 Jan 2017, 07:35 last edited by
Followed that link all the way through and unfortunately I'm still getting the same error as above ^
-
wrote on 26 Jan 2017, 08:23 last edited by Trav
last command I put in was ''''' install_name_tool -change /usr/local/lib/libmysqlclient.18.dylib /usr/local/Cellar/mysql/5.7.17/lib/libmysqlclient.dylib libqsqlmysql.dylib '''' I did some research and this seems to be the correct way to be doing it in context of placing the driver i'm not sure whats going on now though from that command it should be working looking in /usr/local/Cellar/mysql/5.7.17 and running ls i have these files present
cd lib
192:lib trav$ ls
libmysqlclient.20.dylib libmysqld.a plugin
libmysqlclient.a libmysqlservices.a
libmysqlclient.dylib pkgconfigas well as running cd /usr/local/lib then ls I can see that ( see down) are present along with other ones i only included first 5 just for example
libexiv2.14.0.0.dylib
libexiv2.14.dylib
libexiv2.dylib
libmysqlclient.18.dylib
libmysqlclient.20.dylib -
Hi,
What does
otool -L libqsqlmysql.dylib
return ? -
wrote on 27 Jan 2017, 01:32 last edited by
@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
-
wrote on 27 Jan 2017, 09:03 last edited byThis post is deleted!
-
wrote on 27 Jan 2017, 09:11 last edited by
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.
wrote on 27 Jan 2017, 18:05 last edited by Trav@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.wrote on 28 Jan 2017, 00:46 last edited by@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$wrote on 28 Jan 2017, 05:17 last edited by@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.
12/15