Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

DBD::mysql fail

by hauntedbyshadow (Initiate)
on Aug 14, 2014 at 16:21 UTC ( #1097444=perlquestion: print w/replies, xml ) Need Help??

hauntedbyshadow has asked for the wisdom of the Perl Monks concerning the following question:

Hey Everyone, So i'm having a epic time trying to get DBD::mysql to install on my centos server. I started out using perlbrew but it borked everything, so I switched over to using cpan. I removed all modules and have started over. It was going well until I hit a wall getting this one mod installed.

cpan[10]> force make DBD::mysql Running make for module 'DBD::mysql' Running make for C/CA/CAPTTOFU/DBD-mysql-4.028.tar.gz Going to build C/CA/CAPTTOFU/DBD-mysql-4.028.tar.gz make: *** [dbdimp.o] Error 1 CAPTTOFU/DBD-mysql-4.028.tar.gz /usr/bin/make -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent state Failed during this command: CAPTTOFU/DBD-mysql-4.028.tar.gz : make NO

I'm not sure what to do, i'm open to suggestions, not sure if there is a install from source way I haven't found or something i'm missing. Thanks :D

Replies are listed 'Best First'.
Re: DBD::mysql fail
by neilwatson (Priest) on Aug 14, 2014 at 16:31 UTC

    I'm almost certain that Centos or EPEL provides this module already. Why are you trying to install by hand?

    Neil Watson

Re: DBD::mysql fail
by aitap (Curate) on Aug 14, 2014 at 16:32 UTC

    trying to get DBD::mysql to install on my centos server
    CentOS 7 seems to have perl-DBD-MySQL-4.023-5.el7.x86_64.rpm package, so all you need to do is yum install perl-DBD-MySQL.

    Also, try entering look DBD::mysql in CPAN shell and then perl Makefile.PL && make (in the regular one, which should open). This way you will see the full output of the make command, including the error.

Re: DBD::mysql fail
by bulrush (Scribe) on Aug 14, 2014 at 17:54 UTC
    Pretty sure you have to use sudo when on Centos, that's also true on Ubuntu which I just installed and configured for Perl.

    Example: sudo cpan foo::bar

    On Ubuntu 14.04 you would enter your user password, not the root password.

    You also have to use sudo for apt-get when installing apps, or whatever Centos uses. Anyway I went with Centos at first, but it had little support and little help on the internet, so I went with Ubuntu and got it running.

    Perl 5.8.8 on Redhat Linux RHEL 5.5.56 (64-bit)
Re: DBD::mysql fail
by hauntedbyshadow (Initiate) on Aug 14, 2014 at 16:57 UTC
    That is what I would assume but if I run instmodsh it's not there, as well i'm getting this on the page i'm using it. Can't locate Mysql/ in @INC (@INC contains: /usr/local/lib64/perl5

      /usr/local/? It seems that there is a non-system Perl installation running, while yum installs modules only for system perl (the one in /usr/bin/perl, not /usr/local/...). Unless there is something valuable in /usr/local/ that you installed yourself, it might be reasonable to move /usr/local/* somewhere and try running with CentOS-provided /usr/bin/perl.

      [root@server DBD-mysql-4.028-Ba4U9q]# perl Makefile.PL && make make: *** [dbdimp.o] Error 1
      Well, on my system `make` in DBD-mysql-4.028 prints some the commands being executed (and their output) by default. And Makefile.PL is very verbose by itself. Sorry, I can't explain this behaviour. Maybe if you run perl Makefile.PL verbose && make NOECHO=""? It still does not explain where the output of your compiler goes. Is there, by any chance, a log file in the directory DBD-mysql-4.028-Ba4U9q?

Re: DBD::mysql fail
by hauntedbyshadow (Initiate) on Aug 14, 2014 at 17:25 UTC
    Hmmm :-\ same error
    [root@server DBD-mysql-4.028-Ba4U9q]# perl Makefile.PL && make make: *** [dbdimp.o] Error 1 [root@server DBD-mysql-4.028-Ba4U9q]#

      If that's the only output, do a

      make clean
      make distclean
      (I can never remember which). And then
      perl Makefile.PL
      and then
      And then let's see the errors.
Re: DBD::mysql fail
by hauntedbyshadow (Initiate) on Aug 14, 2014 at 18:37 UTC
    I'm in as root, running cpan, and it worked for the other mod's but the no that's not the full errors I just left them out because of the amount of them, here we go.
      dbdimp.h:21:49: error: mysql.h: No such file or directory

      Did you install the MySQL client developer libraries? Maybe the package is named "mysql-dev"?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1097444]
Approved by AppleFritter
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2023-11-29 19:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found