-1

The command is failing to execute while trying to install package through below command. Please note that I'm trying to configure Bugzilla version 5.0.4 on Windows 10 using Perl version 5.26.

cpan DBD::mysql

Complete Command Response:

PS D:\Workspace\bugzilla-5.0.4> cpan DBD::mysql
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Term::ANSIColor loaded ok (v4.06)
Reading 'C:\Perl64\cpan\Metadata'
  Database was generated on Mon, 15 Oct 2018 00:29:03 GMT
Running install for module 'DBD::mysql'
CPAN: Digest::SHA loaded ok (v5.98)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for C:\Perl64\cpan\sources\authors\id\M\MI\MICHIELB\DBD-mysql-4.048.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.26)
DBD-mysql-4.048/
DBD-mysql-4.048/MANIFEST.SKIP
DBD-mysql-4.048/Makefile.PL.embedded
DBD-mysql-4.048/myld
DBD-mysql-4.048/mysql.xs
DBD-mysql-4.048/constants.h
DBD-mysql-4.048/dbdimp.c
DBD-mysql-4.048/Changes
DBD-mysql-4.048/MANIFEST
DBD-mysql-4.048/lib/
DBD-mysql-4.048/lib/Bundle/
DBD-mysql-4.048/lib/Bundle/DBD/
DBD-mysql-4.048/lib/Bundle/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/
DBD-mysql-4.048/lib/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/mysql/
DBD-mysql-4.048/lib/DBD/mysql/INSTALL.pod
DBD-mysql-4.048/lib/DBD/mysql/GetInfo.pm
DBD-mysql-4.048/README.md
DBD-mysql-4.048/Makefile.PL
DBD-mysql-4.048/LICENSE
DBD-mysql-4.048/META.json
DBD-mysql-4.048/socket.c
DBD-mysql-4.048/dbdimp.h
DBD-mysql-4.048/META.yml
DBD-mysql-4.048/t/
DBD-mysql-4.048/t/87async.t
DBD-mysql-4.048/t/41bindparam.t
DBD-mysql-4.048/t/rt50304-column_info_parentheses.t
DBD-mysql-4.048/t/40bit.t
DBD-mysql-4.048/t/16dbi-get_info.t
DBD-mysql-4.048/t/99_bug_server_prepare_blob_null.t
DBD-mysql-4.048/t/41blobs_prepare.t
DBD-mysql-4.048/t/56connattr.t
DBD-mysql-4.048/t/65segfault.t
DBD-mysql-4.048/t/92ssl_riddle_vulnerability.t
DBD-mysql-4.048/t/40bindparam.t
DBD-mysql-4.048/t/35prepare.t
DBD-mysql-4.048/t/70takeimp.t
DBD-mysql-4.048/t/rt75353-innodb-lock-timeout.t
DBD-mysql-4.048/t/rt61849-bind-param-buffer-overflow.t
DBD-mysql-4.048/t/version.t
DBD-mysql-4.048/t/76multi_statement.t
DBD-mysql-4.048/t/40server_prepare_crash.t
DBD-mysql-4.048/t/40bindparam2.t
DBD-mysql-4.048/t/mysql.dbtest
DBD-mysql-4.048/t/53comment.t
DBD-mysql-4.048/t/29warnings.t
DBD-mysql-4.048/t/92ssl_optional.t
DBD-mysql-4.048/t/35limit.t
DBD-mysql-4.048/t/65types.t
DBD-mysql-4.048/t/40types.t
DBD-mysql-4.048/t/rt25389-bin-case.t
DBD-mysql-4.048/t/rt83494-quotes-comments.t
DBD-mysql-4.048/t/30insertfetch.t
DBD-mysql-4.048/t/05dbcreate.t
DBD-mysql-4.048/t/40blobs.t
DBD-mysql-4.048/t/40nulls_prepare.t
DBD-mysql-4.048/t/00base.t
DBD-mysql-4.048/t/80procs.t
DBD-mysql-4.048/t/55utf8mb4.t
DBD-mysql-4.048/t/rt118977-zerofill.t
DBD-mysql-4.048/t/89async-method-check.t
DBD-mysql-4.048/t/lib.pl
DBD-mysql-4.048/t/40nulls.t
DBD-mysql-4.048/t/rt91715.t
DBD-mysql-4.048/t/88async-multi-stmts.t
DBD-mysql-4.048/t/rt110983-valid-mysqlfd.t
DBD-mysql-4.048/t/86_bug_36972.t
DBD-mysql-4.048/t/42bindparam.t
DBD-mysql-4.048/t/32insert_error.t
DBD-mysql-4.048/t/40keyinfo.t
DBD-mysql-4.048/t/51bind_type_guessing.t
DBD-mysql-4.048/t/43count_params.t
DBD-mysql-4.048/t/50chopblanks.t
DBD-mysql-4.048/t/55utf8.t
DBD-mysql-4.048/t/40server_prepare_error.t
DBD-mysql-4.048/t/40server_prepare.t
DBD-mysql-4.048/t/40listfields.t
DBD-mysql-4.048/t/91errcheck.t
DBD-mysql-4.048/t/25lockunlock.t
DBD-mysql-4.048/t/15reconnect.t
DBD-mysql-4.048/t/52comment.t
DBD-mysql-4.048/t/75supported_sql.t
DBD-mysql-4.048/t/rt88006-bit-prepare.t
DBD-mysql-4.048/t/10connect.t
DBD-mysql-4.048/t/92ssl_backronym_vulnerability.t
DBD-mysql-4.048/t/manifest.t
DBD-mysql-4.048/t/60leaks.t
DBD-mysql-4.048/t/71impdata.t
DBD-mysql-4.048/t/rt86153-reconnect-fail-memory.t
DBD-mysql-4.048/t/40numrows.t
DBD-mysql-4.048/t/40catalog.t
DBD-mysql-4.048/t/rt85919-fetch-lost-connection.t
DBD-mysql-4.048/t/41int_min_max.t
DBD-mysql-4.048/t/pod.t
DBD-mysql-4.048/t/81procs.t
DBD-mysql-4.048/t/85init_command.t
DBD-mysql-4.048/t/31insertid.t
DBD-mysql-4.048/t/20createdrop.t
DBD-mysql-4.048/t/50commit.t
CPAN: YAML::XS loaded ok (v0.66)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20171120)
Configuring M/MI/MICHIELB/DBD-mysql-4.048.tar.gz with Makefile.PL
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user '' 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 ''@'localhost' identified by 's3kr1t';

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

perl Makefile.PL --testuser=username

'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
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[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
  MICHIELB/DBD-mysql-4.048.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
ssharma
  • 521
  • 1
  • 7
  • 17

1 Answers1

0

The error message is quite descriptive:

'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
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

You don't have the MySQL client libraries installed, or at least the module installation could not find where you have the MySQL client libraries installed.

Both, Strawberry Perl and ActiveState Perl come with DBD::mysql included resp. ready to install. Are you sure you need to manually install them?

Alternatively, follow the instructions in the INSTALL file of the distribution. You can read it online at https://metacpan.org/pod/distribution/DBD-mysql/lib/DBD/mysql/INSTALL.pod

Corion
  • 3,855
  • 1
  • 17
  • 27