Re: problem getting DBD::mysql working in OS X 10.7

Bruce Johnson <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On Dec 29, 2011, at 4:00 PM, Brian Manning wrote:

> On Thu, Dec 29, 2011 at 2:40 PM, Bruce Johnson
> <[email protected]> wrote:
>> 
>> On Dec 29, 2011, at 3:36 PM, Bruce Johnson wrote:
>> 
>>> I tried installing Bundle::DBD::mysql via cpan, but got errors about how it couldn't find mysql_config, so I downloaded the DBD::mysql package manually and used perl Makefile.pl --mysql_config=/usr/local/mysql/bin/mysql_config which is where my mysql_config file lives (it's a standard install for 10.7 from oracle)
>>> 
>>> That installed correctly, but scripts run by apache on the system fail with the error:
>>> 
>>> [Thu Dec 29 15:25:25 2011] [error] [client 192.168.1.114] install_driver(mysql) failed: Can't load '/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: libmysqlclient.18.dylib
>> 
>> 
>> locally run perl scripts also fail with the same error.
> 
> Does the output of:
> 
> otool -L /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
> 
> list your custom MySQL libraries anywhere?  If the linker can't find
> your MySQL libraries, then you'll need to give the linker some hints.
> You can set the environment variable DYLD_LIBRARY_PATH to point to the
> path where your custom libraries are located, and things should then
> work.

Not sure: 

bruces-Mac-Pro:lib johnson$ otool -L /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
/Library/Perl/5.12/darwin-thread-multi-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 159.1.0)

it lists the dylib, but not the path. Should it show the path?

(and also, this is not a 'custom' MySQL library, I installed this version of MySQL:

"Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive" from here:

http://dev.mysql.com/downloads/mysql/

I'd hope that the standard installer would work out of the box with the DBD module..)




-- 
Bruce Johnson

"Wherever you go, there you are" B. Banzai,  PhD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.