Trying to install DBD::mysql from CPAN and the install failed,
here are the steps I follow:
cpan> install DBI
…
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
/usr/bin/make install — OK
cpan> install DBD::mysql
…
Can’t exec “mysql_config”: No such file or directory at Makefile.PL line 83.
Make had some problems, maybe interrupted? Won’t install
cpan> quit
# cd /root/.cpan/build/DBD-mysql-4.022/
# perl Makefile.PL
Can’t exec “mysql_config”: No such file or directory at Makefile.PL line 83.
# yum install mysql
# perl Makefile.PL
…
Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
# make
…
error: mysql.h: No such file or directory
…
dbdimp.c:5144: warning: assignment makes integer from pointer without a cast
make: *** [dbdimp.o] Error 1
The solution is to install mysql-devel
# yum install mysql-devel
Then DBD-mysql-4.022 was able to make && make install.
1 Response to Installing DBD