[英]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. 我正在运行mac OS X Snow Leopard,我知道这是一个常见问题。
I have installed and reinstalled both the 32- and 64-bit binary installations of MySQL. 我已经安装并重新安装了MySQL的32位和64位二进制安装程序。
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. 那没有用,所以我继续前进(按照我的常识),通过macports安装了perl5,使其与Snow Leopard附带的版本完全不同。
I re-installed DBI
and DBD::mysql
modules into the new perl, both with success. 我成功地将DBI
和DBD::mysql
模块重新安装到了新的perl中。
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
. 我也尝试过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 默认删除com.apple.versioner.perl
Suddenly it just works! 突然,它就可以了! Whatever 随你
Do you get the same error running your perl script as root? 在以root身份运行perl脚本时是否遇到相同的错误?
Does your shell environment possibly have VERSIONER_PERL_PREFER_32_BIT=no set? 您的Shell环境是否可能没有设置VERSIONER_PERL_PREFER_32_BIT =未设置?
there's more info about both of these at http://www.perlmonks.org/?node_id=793727 有关这两者的更多信息, 请访问http://www.perlmonks.org/?node_id=793727
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.