Discussion Locked

DBD::MYSQL

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have installed perl and MySQL on linux for configuring BUGZILLA.
While compiling the module DBD-mysql-2.1024 using make command, I get the following error.

linux#make
cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI -I/usr -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -02 -DVERSION=\"2.1024\" -DXS_VERSION=\"2.1024\" -fpic "I/usr/local/lib/perl5/5.8.0/i686-linux/CORE" dbdimp.c
in file included from dbdimp.h:31,
fromdbdimp.c:29:
/usr/mysql.h:46:23: mysql_com.h: No such file or directory
/usr/mysql.h:47:27: mysql_version.h: No such file or directory
in file included from dbdimp.c:29:
dbdimp.h:32:49: errmsg.h: No such file or directory
make:*** [dbdimp.o]Error 1

Please, help.

Thanks in advance.
Mandar

3 replies

by manojmpatel

I have mysql 4.0.14 installed on RH9. If you
installed mysql using the rpm, than you would
need to get the mysql rpm that includes the
header and libraries. If you installed mysql
using the tar.gz package, you need to make sure
the Makefile for the DBD-mysql-2.9002 that got
generated is pointing to the correct mysql
include path.
I installed mysql using the tar.gz and installed
it in /usr/local/mysql, and than tried to install
the DBD::mysql and ran into several issues, one
of the issue was the one you reported. Here are
all the steps I took to resolve the above problem
and it fixed it:

1) Did "export LANG=C" from bash shell
2) Add /usr/local/mysql/bin directory to the
PATH, so that it can find mysql_config
3) Executed the following from bash shell (my
current directory is
'/root/.cpan/build/DBD-mysql-2.9002'):
perl Makefile.PL
--cflags=-I/usr/local/mysql/include/mysql
--libs="-L/usr/local/mysql/lib/mysql
-lmysqlclient -lz -lcrypt -lnsl -lm"
4) For some reason the Makefile it generated did
not have the correct include path for mysql
4.0.14. The Makefile had the include path of
/usr/local/mysql/include/mysql which is incorrect
according to my installation. I changed the
include path to /usr/local/mysql/include

Manoj.

This discussion is closed to new replies.