I am trying to use perl with mysql. I have a tutorial open which prompted
me to perform the following.

$ sudo perl -MCPAN -e shell
cpan> install DBI
cpan[2]> install DBD::mysql

DBI installed. The 'install DBD::mysql' failed. Is DBD part of DBI? What am
I missing?

The DBD run is in the attached installlation-help.txt file

Thank you;

Sherman
Script started on Mon 23 Mar 2015 02:40:55 PM MDT
sherms: sudo perl -MCPAN -e shell
[sudo] password for sherman: 
Sorry, try again.
[sudo] password for sherman: 

cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.

cpan[1]> install DBD::mysql
Reading '/home/sherman/.cpan/Metadata'
  Database was generated on Mon, 23 Mar 2015 19:53:26 GMT
Running install for module 'DBD::mysql'
Running make for C/CA/CAPTTOFU/DBD-mysql-4.031.tar.gz
Checksum for 
/home/sherman/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.031.tar.gz ok
Scanning cache /home/sherman/.cpan/build for sizes
............................................................................DONE

  CPAN.pm: Building C/CA/CAPTTOFU/DBD-mysql-4.031.tar.gz

Can't exec "mysql_config": No such file or directory at Makefile.PL line 73.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 
's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 481.
Can't find mysql_config. Use --mysql_config option to specify where 
mysql_config is located
Failed to determine directory of mysql.h. Use

  perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type

  perl Makefile.PL --help
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
  CAPTTOFU/DBD-mysql-4.031.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine 
prerequisites
Failed during this command:
 CAPTTOFU/DBD-mysql-4.031.tar.gz              : writemakefile NO '/usr/bin/perl 
Makefile.PL INSTALLDIRS=site' returned status 512

cpan[2]> bye
Lockfile removed.
sherms: exit
exit

Script done on Mon 23 Mar 2015 02:41:31 PM MDT
-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/

Reply via email to