On Aug 6, 2012, at 09:40, Elim Qiu <[email protected]> wrote:

> I need perl database module for mysql. But my current perl not support that:
> ======================================================================
> aMac:mwf elim$ perl install.pl
> dyld: lazy symbol binding failed: Symbol not found: _mysql_init
>   Referenced from: 
> /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
>   Expected in: flat namespace
> 
> dyld: Symbol not found: _mysql_init
>   Referenced from: 
> /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
>   Expected in: flat namespace
> ======================================================================
> I heard macports can fix that and like to get your inputs on that.
> 
> Do I need to remove any perl things by apple? What version of perl should I 
> install and how to use macports to do that? Is macport alone can fix my 
> perl-mysql problem (I have  5.1.61 MySQL Community Server (GPL) running with 
> php apps ok.)?

MacPorts is designed to be self-contained. It will not interact with your 
existing versions of MySQL, PHP, or other software. MacPorts will not use, nor 
should you remove, your Apple supplied version of Perl or any other Apple 
supplied software.

The MacPorts port that provides the Perl DBD::MySQL module is:

p5-dbd-mysql

It has subports for which version of Perl you want. The default Perl in 
MacPorts is 5.12.x so I recommend you use that. To do so:

sudo port install p5.12-dbd-mysql

This will install MacPorts perl5.12 and MacPorts mysql5 and a bunch of other 
dependencies. 

To see what other subports (for other Perl versions) are available, use:

port info p5-dbd-mysql

To see what other variants (for other MySQL versions) are available, use e.g.:

port variants p5.12-dbd-mysql

For example if you decide you'd rather have the newer mysql55 port instead of 
the older mysql5 port, you would use:

sudo port install p5.12-dbd-mysql +mysql55


_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to