[Pdx-pm] DBD::mysql cont.

Chris Dawson cdawson at webiphany.com
Tue Mar 30 02:23:59 CST 2004


The process which is executing the CPAN script should have the PATH 
enviroment variable include the path to the mysql_config script...  :)

Which means:

[iMac:~] jamesmar% export 
PATH=/usr/local/mysql-standard-4.0.15-apple-darwin6.4-powerpc/bin/:$PATH
[iMac:~] jamesmar% mysql_config

/(.. should see something like this...)/
Usage: /opt/wiab/support/mysql/bin/mysql_config [OPTIONS]
Options:
        --cflags        [-I'/opt/wiab/support/mysql/include/mysql']
        --libs          [-L'/opt/wiab/support/mysql/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm]

[iMac:~] jamesmar% cd ~/.cpan/build/DBD-mysql-2.9003 && perl Makefile.PL 
&& make

You might have to use something like "set PATH 
/usr/local/mysql-standard-4.0.15-apple-darwin6.4-powerpc/bin/:$PATH" 
depending on what your shell requires...

Chris

James marks wrote:

> On Mar 30, 2004, at 12:01 AM, Chris Dawson wrote:
>
>> James,
>>
>> mysql_config is a program which returns information about the mysql  
>> libraries and header files, like where they are installed in case 
>> you  placed them in a custom path.   This is so a compiler can 
>> properly  link in the correct files to a mysql related program or 
>> library, which  is what you are doing here by building the .so for 
>> DBD-mysql.  So, I  wonder if you:
>>
>> a) have mysql installed on your Mac?
>
>
> Yes, I've installed it and have build several test databases in it.
>
>> If so, you just need to find out where the mysql_config program is  
>> located, and add this to your path (probably "export  
>> PATH=$PATH:/usr/local/bin" would do it, or try "set PATH...") so 
>> that  the CPAN script can run mysql_config and provide the correct 
>> paths  during compilation of the mysql shared object.
>
>
> I located mysql_config as follows:
>
> [iMac:~] jamesmar% locate mysql_config
> /usr/local/mysql-standard-4.0.15-apple-darwin6.4-powerpc/bin/ 
> mysql_config
>
> When you say "add this to your path" where, exactly, do I do that? In  
> the Terminal? In CPAN? In Makefile.PL?  (I'm sorry. As I said, I'm  
> pretty new to Perl and the Terminal)
>
>> James marks wrote:
>>
>>> I'm still  hesitant to post all the terminal text related to the  
>>> failed install attempt (unless you really want it) but here are 
>>> some  of the errors that I can see:
>>>
>>> (snip)
>>>
>>> Can't exec "mysql_config": No such file or directory at Makefile.PL  
>>> line 174.
>>> readline() on closed filehandle PIPE at Makefile.PL line 176.
>>>
>>
>




More information about the Pdx-pm-list mailing list