After installing perlbrew and perl 5.16.3 into my home directory on a CentOS 6 system, I used cpanm to try and install DBD::mysql.

It failed thusly:

Checking dependencies from MYMETA.json ... Checking if you have Data::Dumper 0 ... Yes (2.135_06) Checking if you have Test::Simple 0.90 ... Yes (1.001014) Checking if you have Test::Deep 0 ... Yes (1.120) Checking if you have DBI 1.08 ... Yes (1.634) Building and testing DBD-mysql-4.033 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 cc -c -I/mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/site_p +erl/5.16.3/x86_64-linux/auto/DBI -I/usr/local/mysql/include -m64 -f +PIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing +-DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -fstack- +protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT +S=64 -O2 -DVERSION=\"4.033\" -DXS_VERSION=\"4.033\" -fPIC "-I/mxhom +e/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux/ +CORE" dbdimp.c /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/bin/perl -p -e "s/~ +DRIVER~/mysql/g" /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/l +ib/site_perl/5.16.3/x86_64-linux/auto/DBI/Driver.xst > mysql.xsi /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/bin/perl /mxhome/ch +arrison/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/ExtUtils/xsubpp +-typemap /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/5.16. +3/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c Warning: duplicate function definition 'do' detected in mysql.xs, line + 242 Warning: duplicate function definition 'rows' detected in mysql.xs, li +ne 754 cc -c -I/mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/site_p +erl/5.16.3/x86_64-linux/auto/DBI -I/usr/local/mysql/include -m64 -f +PIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing +-DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -fstack- +protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT +S=64 -O2 -DVERSION=\"4.033\" -DXS_VERSION=\"4.033\" -fPIC "-I/mxhom +e/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux/ +CORE" mysql.c Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/lib/../lib64" /mxhome/charrison/perl5/perlbrew/perls/per +l-5.16.3/bin/perl myld cc -shared -O2 -L/usr/local/lib -fstack-prote +ctor dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so \ -L/usr/local/mysql/lib/mysql -lpthread -lm -lrt -ldl + \ chmod 755 blib/arch/auto/DBD/mysql/mysql.so cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs chmod 644 blib/arch/auto/DBD/mysql/mysql.bs Manifying blib/man3/DBD::mysql.3 Manifying blib/man3/DBD::README.3 Manifying blib/man3/DBD::mysql::INSTALL.3 Manifying blib/man3/Bundle::DBD::mysql.3 PERL_DL_NONLAZY=1 /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/b +in/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', ' +blib/arch')" t/*.t # Failed test 'use DBD::mysql;' # at t/00base.t line 15. Bailout called. Further testing stopped: Unable to load DBD::mysql # Tried to use 'DBD::mysql'. # Error: Can't load '/mxhome/charrison/.cpanm/work/1460642897.942 +6/DBD-mysql-4.033/blib/arch/auto/DBD/mysql/mysql.so' for module DBD:: +mysql: /mxhome/charrison/.cpanm/work/1460642897.9426/DBD-mysql-4.033/ +blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: mysql_get_server +_version at /mxhome/charrison/perl5/perlbrew/perls/perl-5.16.3/lib/5. +16.3/x86_64-linux/DynaLoader.pm line 190. # at t/00base.t line 15. # Compilation failed in require at t/00base.t line 15. # BEGIN failed--compilation aborted at t/00base.t line 15. FAILED--Further testing stopped: Unable to load DBD::mysql make: *** [test_dynamic] Error 255 -> FAIL Installing DBD::mysql failed. See /mxhome/charrison/.cpanm/wor +k/1460642897.9426/build.log for details. Retry with --force to force +install it. 1 distribution installed
Sorry, that's a mess to read.

I tried previously to install with --force, but then got segfaults using DBD::mysql. Can anybody help?

Thanks..

UPDATE The file /mxhome/charrison/.cpanm/work/1460642897.9426/DBD-mysql-4.033/blib/arch/auto/DBD/mysql/mysql.so does exist.

In reply to Trouble installing DBD::mysql by ibm1620

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.