When running this command: perl -MCPAN -e 'install DBD::mysql' I get a really long output of different errors:
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 89.
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 'philipjoss' 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 'philipjoss'#'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 603.
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 603.
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 603.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
I will use the following settings for compiling and testing:
cflags (guessed) = -I/usr/local/mysql/include
embedded (guessed) =
libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lm -lcrypt -lnsl
mysql_config (guessed) = mysql_config
nocatchstderr (default) = 0
nofoundrows (default) = 0
nossl (default) = 0
testdb (default) = test
testhost (default) =
testpassword (default) =
testport (default) =
testsocket (default) =
testuser (guessed) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
dyld: Library not loaded: #rpath/libmysqlclient.21.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-5/assertlib3PEYQc80
Reason: image not found
Can't link/include C library 'crypt', 'nsl', aborting.
Warning: No success on command[/usr/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
There seems to be quite a few posts and articles on this kind of error but the solutions all seem to be Linux focussed. I think the key part of this is that I need a mysql_config file but I have no idea where to start on this!
MacOS is 11.5.2. Perl is 5.30.2. MySQL is 8.0.26.
Thanks in advance!
Update:
Adding the specific mysql directory to my path as suggested in the comments below has got me a little further along but I'm getting a whole different set of errors now:
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'philipjoss' 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 'philipjoss'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql-8.0.26-macos11-x86_64/include
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/mysql-8.0.26-macos11-x86_64/lib -lmysqlclient -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
dyld: Library not loaded: #rpath/libmysqlclient.21.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib3PoRLEqr
Reason: image not found
dyld: Library not loaded: libssl.1.1.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib_CG2WA4d
Reason: image not found
dyld: Library not loaded: libcrypto.1.1.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib0lH0wftp
Reason: image not found
wrong result: 'mysqlclient', 'ssl', 'crypto'
Warning: No success on command[/usr/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Update 2:
Following advice from the comments below I've switched to perlbrew and after one failure I've now finally got it installed (it took about 45 mins each time). Running my script now using perlbrew exec perl oncourt_update.pl now returns the original error: install_driver(mysql) failed: Can't locate DBD/mysql.pm in #INC. I've tried an installation using perlbrew use perl-5.34.0; cpan DBD::mysql however I get the following output:
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'philipjoss' 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 'philipjoss'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.26/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.26/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
Warning: No success on command[/Users/philipjoss/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/Users/philipjoss/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL -- NOT OK
Looking at the output the line mysql> grant all privileges on test.* to 'philipjoss'#'localhost' looks strange as philipjoss isn't the username for localhost. Could this be something to do with the error? I note that the output states:
database user 'philipjoss' 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.```
Related
I am constantly failing in installing DBD::mysql.
The command I used was:
brew install mysql
cpanm DBD::mysql
The error I got was:
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ... OK
Configuring DBD-mysql-4.050 ... N/A
! Configure failed for DBD-mysql-4.050. See /Users/jeji/.cpanm/work/1642350924.83890/build.log for details.
Therefore, I checked by log file. My log file read:
cpanm (App::cpanminus) 1.9018 on perl 5.030003 built for darwin-thread-multi-2level
Work directory is /Users/jeji/.cpanm/work/1642350924.83890
You have make /usr/bin/make
You have LWP: 6.44
You have LWP::Protocol::https: 6.07
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
You have /usr/bin/unzip
Searching DBD::mysql () on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz
-> OK
Unpacking DBD-mysql-4.050.tar.gz
Entering DBD-mysql-4.050
Checking configure dependencies from META.json
Checking if you have DBI 1.609 ... Yes (1.643)
Checking if you have Data::Dumper 0 ... Yes (2.174)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Checking if you have Devel::CheckLib 1.09 ... Yes (1.14)
Configuring DBD-mysql-4.050
Running Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'jeji' 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 'jeji'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.27_1/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.27_1/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = jeji
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
-> N/A
Checking dependencies from META.json ...
Checking if you have Time::HiRes 0 ... Yes (1.9760)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Test::Deep 0 ... Yes (1.130)
Checking if you have Test::Simple 0.90 ... Yes (1.302162)
Checking if you have bigint 0 ... Yes (0.51)
Checking if you have DBI 1.609 ... Yes (1.643)
-> FAIL Configure failed for DBD-mysql-4.050. See /Users/jeji/.cpanm/work/1642350924.83890/build.log for details.
I do think that 'Can't link/include C library 'ssl', 'crypto', aborting.
-> N/A' is the part that is causing the issue, but I have no clue in how to approach the problem.
Any solutions would be great!
Thanks in advance :)
Here's how I got DBD::mysql installed on macOS:
cpan -T DBI
sudo cpanm DBD::mysql -n \
--configure-args="--libs='-L/usr/local/opt/openssl/lib -lssl -lcrypto -lperconaserverclient'"
I was installing Percona Server instead of MySQL so you might not need the last option.
Update: In more recent releases of MacOS, I can't get this to work. I tried for a few days to resolve the compile errors, but then I gave up. I'll use Python now. The era of Perl is over, which makes me sad because I've enjoyed using Perl since around 1996.
Bugzilla ./checksetup.pl report:
YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database you use):
SQLite: /usr/bin/perl install-module.pl DBD::SQLite
MySQL: /usr/bin/perl install-module.pl DBD::mysql
PostgreSQL: /usr/bin/perl install-module.pl DBD::Pg
Oracle: /usr/bin/perl install-module.pl DBD::Oracle
Here is the output of
$ /usr/bin/perl install-module.pl DBD::mysql
Checking for CPAN (v1.81) ok: found v2.11
Checking for YAML (any) ok: found v1.20
Checking for ExtUtils-MakeMaker (v6.31) ok: found v7.0401
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 10 Dec 2016 15:17:02 GMT
Installing DBD::mysql version 4.041...
Running install for module 'DBD::mysql'
Checksum for /root/.cpan/source/authors/id/M/MI/MICHIELB/DBD-mysql-4.041.tar.gz ok
Configuring M/MI/MICHIELB/DBD-mysql-4.041.tar.gz with Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 88.
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 561. 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
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 LIB="/var/www/bugzilla/lib"
INSTALLMAN1DIR="/var/www/bugzilla/lib/man/man1"
INSTALLMAN3DIR="/var/www/bugzilla/lib/man/man3"
INSTALLBIN="/var/www/bugzilla/lib/bin"
INSTALLSCRIPT="/var/www/bugzilla/lib/bin" INSTALLDIRS=perl]
MICHIELB/DBD-mysql-4.041.tar.gz /usr/bin/perl Makefile.PL
INSTALLDIRS=site LIB="/var/www/bugzilla/lib"
INSTALLMAN1DIR="/var/www/bugzilla/lib/man/man1"
INSTALLMAN3DIR="/var/www/bugzilla/lib/man/man3"
INSTALLBIN="/var/www/bugzilla/lib/bin"
INSTALLSCRIPT="/var/www/bugzilla/lib/bin" INSTALLDIRS=perl -- NOT OK
When trying
$ /usr/bin/perl install-module.pl DBD::mysql --mysql_config /etc/mysql/mysql.conf.d
This error is reported
There is no Perl module on CPAN named /etc/mysql/mysql.conf.d/usr/bin/perl
Here are the details of the system I am working with
Linux
Ubuntu 16.04.1 LTS
Apache:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-07-14T12:32:26
MySQL:
Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper
Perl:
perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
After reading #Borodin's comment, I issued:
$ sudo apt-get install libdbd-mysql-perl
and the $ ./checksetup.pl --check-modules no longer report any errors.
(Many thanks #Borodin for the hint :-)
I was having the same issue while trying to install bugzilla,
Assumed that you have bugzilla in directory var/www/html
What i did was
Just go to the directory : var/www/html/bugzilla and execute command:
perl install-module.pl --all
If in the end you don't get an automatic installation, try a manual installation.
DBD::mysql manual installation
I have installed R3.0.1. Rtools is also installed. MySQL version 5.7 is installed. I want to connect R to MySQL, and I am trying to do that through RMySQL package in R.
While the installation of RMySQL is finally done after looking at various SO questions, the library command gives error. Please see below complete R logs. Please help.
> install.packages("RMySQL",type="source")
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
downloaded 161 Kb
* installing *source* package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
checking for $MYSQL_HOME... C:/Program Files/MySQL/MySQL Server 5.7
cygwin warning:
MS-DOS style path detected: C:/Program
Preferred POSIX equivalent is: /cygdrive/c/Program
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
test: Files/MySQL/MySQL: unknown operand
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture
cygwin warning:
MS-DOS style path detected: D:/SOFTWA~1/R-30~1.3/etc/x64/Makeconf
Preferred POSIX equivalent is: /cygdrive/d/SOFTWA~1/R-30~1.3/etc/x64/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc -m64 -I"D:/SOFTWA~1/R-30~1.3/include" -DNDEBUG -I"C:/Program Files/MySQL/MySQL Server 5.7"/include -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall - std=gnu99 -mtune=core2 -c RS-DBI.c -o RS-DBI.o
RS-DBI.c: In function 'RS_na_set':
RS-DBI.c:1219:11: warning: variable 'c' set but not used [-Wunused-but-set-variable]
gcc -m64 -I"D:/SOFTWA~1/R-30~1.3/include" -DNDEBUG -I"C:/Program Files/MySQL/MySQL Server 5.7"/include -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall - std=gnu99 -mtune=core2 -c RS-MySQL.c -o RS-MySQL.o
RS-MySQL.c: In function 'RS_MySQL_fetch':
RS-MySQL.c:657:13: warning: variable 'fld_nullOk' set but not used [-Wunused-but-set- variable]
RS-MySQL.c: In function 'RS_DBI_invokeBeginGroup':
RS-MySQL.c:1137:30: warning: variable 'val' set but not used [-Wunused-but-set-variable]
RS-MySQL.c: In function 'RS_DBI_invokeNewRecord':
RS-MySQL.c:1158:20: warning: variable 'val' set but not used [-Wunused-but-set-variable]
RS-MySQL.c: In function 'RS_MySQL_dbApply':
RS-MySQL.c:1219:38: warning: variable 'fld_nullOk' set but not used [-Wunused-but-set-variable]
gcc -m64 -shared -s -static-libgcc -o RMySQL.dll tmp.def RS-DBI.o RS-MySQL.o C:/Program Files/MySQL/MySQL Server 5.7/bin/libmySQL.dll - Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LD:/SOFTWA~1/R-30~1.3/bin/x64 -lR
installing to D:/Softwares/R-3.0.3/library/RMySQL/libs/x64
** R
** inst
** preparing package for lazy loading
Creating a generic function for 'format' from package 'base' in package 'RMySQL'
Creating a generic function for 'print' from package 'base' in package 'RMySQL'
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
MYSQL_HOME defined as C:/Program Files/MySQL/MySQL Server 5.7
* DONE (RMySQL)
The downloaded source packages are in
‘C:\Users\mitrabhanu.panda\AppData\Local\Temp\RtmpgZHT8R\downloaded_packages’
> library(RMySQL)
Looking in C:\Program Files/MySQL, C:/MySQL, D:/MySQL, E:/MySQL, F:/MySQL, G:/MySQL, C:/xampp/MySQL, D:/xampp/MySQL, E:/xampp/MySQL, F:/xampp/MySQL, G:/xampp/MySQL, C:/Apps/MySQL, D:/Apps/MySQL, E:/Apps/MySQL, F:/Apps/MySQL, G:/Apps/MySQL
Found C:\Program Files/MySQL
Error : .onLoad failed in loadNamespace() for 'RMySQL', details:
call: setwd(bin)
error: character argument expected
Error: package or namespace load failed for ‘RMySQL’
Please let me know what I have done wrong.
As written in my comment, here is the sample code for reading a table from mysql:
require(RJDBC)
j <- JDBC(classPath='/path/to/mysql/jdbc/jar', driverClass='com.mysql.jdbc.Driver')
connection <- dbConnect(j, 'jdbc:mysql://localhost/databasename', 'myusername','mypassword')
on.exit(dbDisconnect(connection))
data.frame.from.sql <- dbReadTable(connection, 'tablename')
This will read the table named tablename from databasename into data.frame.from.sql as an R data frame that you can manipulate as you see fit. I hope this helps.
I'm trying to install mysql using:
cpanm DBD::mysql
I got output error like this: Set up gcc environment - 3.4.5 (mingw-vista special r3)
--> Working on DBD::mysql
Fetching http: //www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.025.tar.gz ... OK
Configuring DBD-mysql-4.025 ... OK
Building and testing DBD-mysql-4.025 ... FAIL
! Installing DBD::mysql failed. See C:\Users\myuser\cpanm\work\1384776992.9536\build.log for details. Retry with --force to force install it
When I opened the log file to check the detail, it's as bellows. Is there anyone help me out:
cpanm (App::cpanminus) 1.7001 on perl 5.012004 built for MSWin32-x86-multi-thread
Work directory is C:\Users\myuser/.cpanm/work/1384776992.9536
You have make C:\Perl\site\bin\dmake.exe
You have LWP 6.02
Falling back to Archive::Tar 1.76
Searching DBD::mysql on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.025.tar.gz
-> OK
Unpacking DBD-mysql-4.025.tar.gz
Entering DBD-mysql-4.025
Checking configure dependencies from META.yml
Checking if you have DBI 1.08 ... Yes (1.616)
Configuring DBD-mysql-4.025
Running Makefile.PL
Set up gcc environment - 3.4.5 (mingw-vista special r3)
mysql_config.pl, and an associated bat file, has been
successfully created under
C:\PROGRA~1\MySQL\MYSQLS~1.1\bin
Unknown option: testdb
Unknown option: testhost
Unknown option: testuser
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
Unknown option: testpassword
Unknown option: testsocket
Unknown option: testport
Unknown option: nocatchstderr
Unknown option: ssl
Unknown option: nofoundrows
Unknown option: force-embedded
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\include"
embedded (mysql_config) =
ldflags (mysql_config) =
libs (mysql_config) = -LC:\PROGRA~1\MySQL\MYSQLS~1.1\lib\opt -lmysqlclient -lzlib
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) =
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
META.json
t/mem_leak.pl
Please inform the author.
Note (probably harmless): No library found for -lmysqlclient
Note (probably harmless): No library found for -lzlib
Using DBI 1.616 (for perl 5.012004 on MSWin32-x86-multi-thread) installed in C:/Perl/lib/auto/DBI/
Writing Makefile for DBD::mysql
-> OK
Finding PREREQ from Makefile ...
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Data::Dumper 0 ... Yes (2.128)
Checking if you have Test::Deep 0 ... Yes (0.110)
Checking if you have DBI 1.08 ... Yes (1.616)
Building and testing DBD-mysql-4.025
cp lib/DBD/mysql.pm blib\lib\DBD\mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib\lib\DBD\mysql\GetInfo.pm
cp README.pod blib\lib\DBD\README.pod
cp lib/DBD/mysql/INSTALL.pod blib\lib\DBD\mysql\INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib\lib\Bundle\DBD\mysql.pm
C:/Perl/site/bin/gcc.exe -c -IC:\Perl\lib\auto\DBI -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\include" - DDBD_MYSQL_INSERT_ID_IS_GOOD -g -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVERSION=\"4.025\" -DXS_VERSION=\"4.025\" "-IC:\Perl\lib\CORE" dbdimp.c
In file included from dbdimp.c:18:
dbdimp.h:21:49: mysql.h: No such file or directory
dbdimp.h:22:45: mysqld_error.h: No such file or directory
dbdimp.h:24:49: errmsg.h: No such file or directory
In file included from dbdimp.c:18:
dbdimp.h:157: error: syntax error before "MYSQL"
dbdimp.h:157: warning: no semicolon at end of struct or union
dbdimp.h:180: error: syntax error before '}' token
dbdimp.h:255: error: syntax error before "MYSQL_RES"
dbdimp.h:255: warning: no semicolon at end of struct or union
dbdimp.h:258: error: syntax error before "row_num"
dbdimp.h:258: warning: data definition has no type or storage class
dbdimp.h:263: error: syntax error before "insertid"
dbdimp.h:263: warning: data definition has no type or storage class
dbdimp.h:267: error: conflicting types for 'use_mysql_use_result'
dbdimp.h:165: error: previous declaration of 'use_mysql_use_result' was here
dbdimp.h:274: error: syntax error before '}' token
...............................................
-> FAIL Installing DBD::mysql failed. See C:\Users\wangw35\.cpanm\work\1384776992.9536\build.log for details. Retry with --force to force install it.
These are the two important lines.
Note (probably harmless): No library found for -lmysqlclient
Note (probably harmless): No library found for -lzlib
You need to install the mysqlclient (and also zlib) on your system.
Hi I m very new to Linux & mysql...while I m installing ndoutils for nagios ,I have to execute this command from Db folder---
./installdb -u root -p root -h localhost -d nagios
while executing this command m getting this error-
install_driver(mysql) failed: Can't load
'/usr/lib/perl5/auto/DBD/mysql/mysql.so' for module DBD::mysql:
libmysqlclient.so.16: cannot open shared object file: No such file or
directory at /usr/lib/perl5/DynaLoader.pm line 200. at (eval 7) line
3 Compilation failed in require at (eval 7) line 3. Perhaps a required
shared library or dll isn't installed where expected at ./installdb
line 41
What should I do to remove this error? Help me
Looks like you need to install DRD::mysql for perl.
http://metacpan.org/pod/DBD::mysql