> Im trying to install the module DBD::mysql so I can connect to a mysql
> database from a perl script. The instructions for installing told me to
> run the command:
> 
> perl -MCPAN -e 'install Bundle::DBD::mysql'
> 
> this did its thing, downloaded and unzipped some gz gfiles, etc. Then said
> everything was ok when it was done. I tried to run my script and it said
> it couldnt find the DBD:mysql module. So I checked my perl lib directories
> and there is no mysql.pm file anywhere in sight. I tried a million things,
> like actually placing the mysql.pm file in my lib directories then
> installing that file with (perl -MCPAN -e 'install DBD::mysql'), which
> seemed to install just fine, but the scipt still gives me errors.
> 
> Now when I try to reinstall the whole bundle it gives me this error:
> ________________________
> [i took out other stuff from here]
> DBD-mysql-2.9003/dbdimp.h
> DBD-mysql-2.9003/mysql.xs
> DBD-mysql-2.9003/MANIFEST.SKIP
> DBD-mysql-2.9003/README
> DBD-mysql-2.9003/INSTALL.html
> DBD-mysql-2.9003/Makefile.PL
> DBD-mysql-2.9003/ChangeLog
> DBD-mysql-2.9003/constants.h
> DBD-mysql-2.9003/TODO
> Removing previously used /root/.cpan/build/DBD-mysql-2.9003
> 
>   CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9003.tar.gz
> 
> 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.
> 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.
> 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.
> 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.
> 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.
> Failed to determine directory of mysql.h. Use
> 
>   perl Makefile.PL --cflags=-I<dir>
> 
> to set this directory. For details see the INSTALL.html file,
> section "C Compiler flags" or type
> 
>   perl Makefile.PL --help
> Running make test
>   Make had some problems, maybe interrupted? Won't test
> Running make install
>   Make had some problems, maybe interrupted? Won't install
> DBD::mysql is up to date.
> Bundle summary: The following items in bundle Bundle::DBD::mysql had
> installation problems:
>   Mysql 
> 
> _____________________________
> 
> And when i try to install run my perl scipt the error I get is still:
> 
> _______
> install_driver(mysql) failed: Can't locate loadable object for module
> DBD::mysql in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux
> /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux
> /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0
> /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux
> /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at (eval 1)
> line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a module that DBD::mysql requires hasn't been fully installed
>  at load_data.pl line 18
> _______
> 
> 
> So, I guess the most interesting msg it gives me is "Failed to determine
> directory of mysql.h.". Do I need to install some sort of other mysql
> stuff on the server running perl? Because the mysql database Im trying to
> access is on a different server?
> 
> Any ideas at all? Anything? Please? Please? Thanks all.
> 

You have to have the c libraries for mysql installed, and generally the
'mysql_config' program that is installed with the dev kit in your path.
 The module installation procedures execute it to find out where the
libraries and headers are for your mysql installation. You do not need
the full client or the server components, but you do need at least the
dev kit.  Check that these are installed, check that the lib and include
paths are set properly, remove the file you placed manually, and try
re-running the install.

HTH,

http://danconia.org



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to