tags:

views:

498

answers:

3

I am trying to install DBD::mysql and I am getting thousands of warnings and errors when I install like this:

perl -MCPAN -e 'install DBD::mysql'

The errors are like:

dbdimp.c:3215 error: 'imp_sth_t' has no member named 'warning_count'

Then at the end it says:

make had returned a bad status, install seems impossible

This also fails:

 perl -MCPAN -e 'install Geo::IP::PurePerl'
+1  A: 

I'm guessing you don't have the MySQL client libraries and headers installed, which is breaking the compile. Try installing the mysqlclient RPMs first. Alternatively, see if there's an RPM package for the CPAN module that you can use.

friedo
that didn't seem to work.I did yum install mysqland ran perl -MCPAN -e 'install DBD::mysql'again. It failed. Again.
Ramblingwood
this was helpful, but Alexandr completed the answer.
Ramblingwood
+2  A: 

install perl-DBD-MySQL, or if don't want to install from rpm, install mysql-devel package first

Alexandr Ciornii
I installed mysql-devel, and that fixed everything.thanks.do you know where you can look up where rpms of CPAN stuff it in the future?
Ramblingwood
+2  A: 

The DBD::mysql module can be a little tempermental. Look at the README and INSTALL.html files that came with your DBD-mysql distribution (typically in the ~/.cpan/build/DBD-mysql-XXXXX directory). Here is a typical INSTALL.html file for this module.

Those files will have specific advice for installing the module for your operating system and the particular way you have MySQL installed on your machine.

mobrule