DBD-mysql : dyld Error

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

DBD-mysql : dyld Error

Postby Fawzi_Masri » 23. March 2009 05:17

Hello,

I am having trouble setting dbd-mysql on my MAC Book Pro MAC OSX 10.5.6... i spent a week on this already, so frustration level is thru the roof... :) hope you can help

when i try to connect to mysql database in a perl cgi script, i get an error:
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /usr/local/lib/perl5/site_perl/5.10.0/darwin-2level/auto/DBD/mysql/mysql.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _mysql_init
Referenced from: /usr/local/lib/perl5/site_perl/5.10.0/darwin-2level/auto/DBD/mysql/mysql.bundle
Expected in: dynamic lookup


I am using xampp as a "lamp" server.

I have done a manual install of DBD::mysql since CPAN cannot install it... it returns some error.
OS: MAC Book Pro MAC OSX 10.5.6
Perl : version 5.10 at /usr/bin
DBI: version 1.607
DBD: version 4.010
mysql : version 14.12 dis 5.0.67 at /Applications/xampp/xamppfiles/bin//mysql ( the "//" is not a typo, i just noticed it.)
Fawzi_Masri
 
Posts: 3
Joined: 23. March 2009 05:10

Re: DBD-mysql : dyld Error

Postby Wiedmann » 23. March 2009 05:19

I have done a manual install of DBD::mysql

What does you mean with a "manual install"?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: DBD-mysql : dyld Error

Postby Fawzi_Masri » 23. March 2009 05:41

I downloaded source and followed installation using perl Makefile.PL... make...make install.
that's because CPAN installation did not go thru....i could not figure how i can retrieve the actual error message from cpan.
DBI was already installed...mysql is also running.
Fawzi_Masri
 
Posts: 3
Joined: 23. March 2009 05:10

Re: DBD-mysql : dyld Error

Postby Fawzi_Masri » 23. March 2009 20:37

Problem solved...
I basically stayed away from the many examples on the web that used /usr/bin/perl, and /usr/local/mysql....
so it works, now, but it is a cop-out, since the other methods should work as well... anyways this is easier to maintain since i am using an xampp distribution...we'll see about that.

- Fresh install of xampp-0.74
- Download and tar xvf the developer package of xampp to /mytmp
- note: i needed the include dir in the developer package for cpan to install DBD-mysql, namely the mysql include files
- Copied the /mytmp/xampp/xamppfiles/include to /Applications/xampp/xamppfiles

- Installed DBI and DBD:mysql using CPAN and the perl in xampp. It is important to use XAMPP perl, and /usr/bin.
- sudo /Applications/xampp/xamppfiles/bin/perl -MCPAN -e 'install DBI'
- sudo /Applications/xampp/xamppfiles/bin/perl -MCPAN -e 'install DBD::mysql'
- in my scripts, i used #!/Applications/xampp/xamppfiles/bin/perl instead #!/usr/bin/perl
Fawzi_Masri
 
Posts: 3
Joined: 23. March 2009 05:10


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests