When installing DBD::mysql I received two errors:

install DBD::mysql =>
An error occurred while linking the DBD::mysql driver. The error
message seems to indicate that you don't have a libz.a,
or a libz.so. There are a few ways to resolve this:

1) You may try to remove the -lz or -lgz flag from the libs list
   by using the --libs switch for "perl Makefile.PL".
2) On Red Hat Linux and SUSE Linux, install the zlib-devel package
   (sometimes called libz-devel)
3) On Debian and Ubuntu, install the zlib1g-dev package
4) On other systems, please contact the mailing list

     perl@lists.mysql.com

For further hints, see INSTALL.html, section Linker flags.
make: *** blib/arch/auto/DBD/mysql/mysql.so Error 1
  /usr/bin/make  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
So I installed zlib1g-dev
Then I tried to install it again, and I got this error:

install DBD::mysql =>
Running install for module DBD::mysql
Running make for C/CA/CAPTTOFU/DBD-mysql-4.007.tar.gz
  Is already unwrapped into directory /root/.cpan/build/DBD-mysql-4.007
  Has already been processed within this session
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
I removed the directory /root/.cpan/build/DBD-mysql-4.007 but after a retry I had the same error.

I must say I am a total noob on PERL and CPAN, so I hope it is an easy fix.

Best regards,

Geert

In reply to Error installing DBD::mysql on Debian by Geert86

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.