Impossible d'installer DBD:mysql sous Cygwin
Bonjour,
Sous Cygwin j’exécute ce script en Perl afin de se connecter à ma base MySQL
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| #!/usr/bin/perl -w
# Purpose: connect to MySQL
use strict;
use warnings;
use DBI;
# ************************************************************
# Global Variables
my $dbh;
# ************************************************************
# Script
$dbh = DBI->connect('DBI:mysql:vod.report', 'root', 'azerty'
) || die "Could not connect to database: $DBI::errstr";
# (insert query examples here...)
$dbh->do('insert into zz_billing values("1037033","47051","15157","Secret défense","0","20110225180326","36","FFD"');
$dbh->disconnect(); |
Le script n'y arrive pas, voici ce qu'il m'affiche
Code:
1 2 3 4 5
| install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at (eval 3) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
at dbi.pl line 15 |
Quand j'essaye d'install sous CPAN le module DBN::mysql
Voici ce qu'il me retourne
Qui peut m'aider?
Merci d'avance.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| CPAN: Module::CoreList loaded ok (v2.18)
CPAN.pm: Building C/CA/CAPTTOFU/DBD-mysql-4.020.tar.gz
Can't exec "mysql_config": No such file or directory at Makefile.PL line 83.
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 478.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 478.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 478.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'Nicolas' 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 'Nicolas'@'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 478.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 478.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 478.
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 the INSTALL.html file,
section "C Compiler flags" or type
perl Makefile.PL --help
Warning: No success on command[/usr/bin/perl Makefile.PL]
CAPTTOFU/DBD-mysql-4.020.tar.gz
/usr/bin/perl Makefile.PL -- 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.020.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 512 |