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

1195 3842

Last Topic: Comment form customization by anisa on Feb 8, 2010

60 184

Last Topic: Dynamic Publishing - Blank Screen by Sivaram M on Dec 15, 2009

955 2985

Last Topic: MT5 - Cookie Problems by Dave Cross on Feb 9, 2010

68 213

Last Topic: How to add Custom Fields by gregoryttp on Feb 5, 2010

19 67

Last Topic: Custom main index page by Richard on Feb 7, 2010

42 169

Last Topic: I want to write my own wordpress plugin by Xarzu on Jan 31, 2010

11 21

Last Topic: Monthly Calendars Help Needed by joe leblanc on Jan 19, 2010

91 326

Last Topic: SpamLookup Keyword Filter 2.1 not work by b.n09 on Nov 17, 2009

52 178

Last Topic: Assets - No options by Chelle on Feb 5, 2010

code.sixapart.com

128 444

Last Topic: ActionStream with Movable Type 5.01 by Parneix on Jan 24, 2010

154 468

Last Topic: URGENT! Help needed w/ Virus by PhilContrino on Feb 1, 2010