简体   繁体   中英

perl cannot compile with error of lazy symbol binding not found for _mysql_init

I'm running mac OS X Snow Leopard and I recognize that this is a common problem.

I have installed and reinstalled both the 32- and 64-bit binary installations of MySQL.

That didn't work, so I went ahead and (against my common sense) installed perl5 through macports to have an entirely different perl than the version that ships with Snow Leopard.

I re-installed DBI and DBD::mysql modules into the new perl, both with success.

And yet still:

me$ perl5 processmail
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /opt/local/lib/perl5/site_perl/5.8.9/darwin-      2level/auto/DBD/mysql/mysql.bundle
  Expected in: dynamic lookup

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

I have also tried perl5 processmail --mysql_config=/usr/local/mysql/bin/mysql_config .

Thanks in advance

I just finally solved this on our box by getting rid of the default setting

defaults delete com.apple.versioner.perl

Suddenly it just works! Whatever

Do you get the same error running your perl script as root?

Does your shell environment possibly have VERSIONER_PERL_PREFER_32_BIT=no set?

there's more info about both of these at http://www.perlmonks.org/?node_id=793727

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM