[Catalyst] install_driver(mysql) failed:

Daniel J. Luke dluke at geeklair.net
Mon Apr 2 14:29:47 GMT 2012

On Apr 2, 2012, at 12:22 AM, Robyn Jonahs wrote:
> Ok so if I remove the link or leave it, the output from otool -L is
> /FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/auto/DBD/mysql/mysql.bundle:
>     libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
> Which I did, but I did not understand what to do with the info. Any help there?

To me, it looks like the install_name on libmysqlclient.18.dylib is incorrect (which would have happened when you built/installed mysql). I took a quick look at the Macports port for mysql and didn't see any patching to fix that there - so I don't know why your mysql build would have an incorrect install_name. Did you build mysql yourself or install a binary/package from somewhere?

The 'correct' fix would be to adjust the install_name on libmysqlclient.18.dylib and then rebuild DBD::mysql (there are, of course, lots of other ways you could fix it).

> I can also do the fix at the link by setting the path to the file in the environment variable 
> export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"

There's almost never a time when setting the DYLD_* environment variables on Mac OS X is a good idea (and you would want DYLD_FALLBACK_LIBRARY_PATH anyway...)

> I don't have an indexer or /usr/local/bin/search files so I don't know what to do with the install_name_tool exactly to set the paths. Won't this go away if the system gets updated link the symbolic link?

stuff in /usr/local is stuff you installed so Apple won't touch it with updates

> sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/bin/indexer

see the manpage for install_name_tool for details on how to use it.

You could fix just your mysql.bundle, libmysqlclient.18.dylib and mysql.bundle, or maybe even just add an rpath to mysql.bundle to get it to search /usr/local/mysql/lib

Daniel J. Luke                                                                   
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          

More information about the Catalyst mailing list