user-pic

"Symbol not found: _mysql_init" on Leopard

Vote 0 Votes

I had MT working fine on Leopard on my old PowerBook. I recently bought a new MacBook and am having trouble getting MT up and running again.

I’ve installed DBI and DBD::mysql (CPAN says both are up to date) but when I try to access mt.cgi I get an Internal Server Error and the error logs say:

” dyld: lazy symbol binding failed: Symbol not found: mysqlinit Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup

dyld: Symbol not found: mysqlinit Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup

Premature end of script headers: mt.cgi ” I thought it might be something to do with the old PPC version of MySQL that was copied over to the new laptop but I’ve installed mysql-5.0.67-osx10.5-x86_64 and still get the error. I can access MySQL fine on the command line and via my own PHP pages.

I’ve been Googling all afternoon and can only find fixes for Ruby users with similar problems, nothing about Perl. Any ideas anyone…? Thanks.

Reported on Movable Type 4.2

9 Replies

| Add a Reply
  • (It would be *so* useful to mention Markdown must be used on the "Start Topic" page you know... And have a 'Preview' button too.)

  • http://www.entropy.ch/blog/Developer/2008/03/25/Installing-Perl-DBD-mysql-on-Mac-OS-X-10-5.html

    Perl is 32bit on Leopard, and you use a 64bit version of MySQL. Try replacing the 64 bit version of MySQL with the 32bit version.

  • Thanks Mike. Unfortunately, since posting my earlier message I've tried that but have the same problem.

    I was originally using **mysql-5.0.51a-osx10.4-powerpc** then I installed **mysql-5.0.67-osx10.5-x86\_64** and I am now on **mysql-5.0.67-osx10.5-x86** (which I assume is the 32 bit version?).

    I've have had the same error message with them all, which seems a bit odd to be honest. I'm wondering if I should uninstall DBD::mysql and reinstall it, maybe using flags like this:

    > sudo perl Makefile.PL \
    > --cflags="-I/usr/local/mysql/include -g -Os -arch i386 -fno-common"

    which I've seen mentioned elsewhere. But I don't know how to uninstall a perl module installed by CPAN...

  • I also had tried installing the 64-bit version of mysql on Leopard but had similar problems. The non-64 "x86" package is the one you want.

    Removing the existing CPAN module is just a matter of removing the files/directories under /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql and /Library/Perl/5.8.8/darwin-thread-multi-2level/DBD/mysql.

  • Phew, thanks guys.

    Mike, I already had that in my path, but I'm guessing that because I first installed DBD::mysql when I had the old PPC MySQL installed, that was when things first screwed up.

    Brad, thanks for the uninstall instructions. I did that and managed to manually install DBD::mysql (installing it via CPAN seems like a problem). And, finally, MT works!

    Thanks so much.

  • Dear Phil and others,

    I am having exactly the same problem when I am trying to access mysql from Perl. I have the 64 bit version of mysql installed on Leopard and the most recent DBD and DBI modules. mysql works and I had no problems installing DBD and DBI, which I downloaded from CPAN. From your conversion on Nov 20, I could not figure out what actually solved the problem. Can you try and summarize?

    Thanks so much!

    Tina

    The error message:


    dyld: lazy symbol binding failed: Symbol not found: _mysql_init
    Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
    Expected in: dynamic lookup

    dyld: Symbol not found: _mysql_init
    Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
    Expected in: dynamic lookup

    Trace/BPT trap

    • You should switch to the 32bit version of MySQL, remove your old copies of DBD and DBI, and rebuild them from source for the 32bit version of MySQL. You can't mix 64bit MySQL with 32bit Perl.

  • thchest, I summarised what worked for me [on my site](http://www.gyford.com/phil/writing/2008/11/20/dbd_mysql_leopard.php) although I don't think I mention anything that Mike T and Brad haven't mentioned here. Good luck!

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1771 6153

Last Topic: Preview Template - Where can I find it? by Dice on Feb 6, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1428 5076

Last Topic: Stupid Question? How to make a static homepage by Jeremy on Feb 3, 2012

693 2907

Last Topic: database upgrade hangs - upgrading to 4.37 by CrankyProfessor on Feb 1, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

221 710

Last Topic: Publish queue cache coherence issue by Istvan Kallai on Jan 27, 2012