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

Hello all, i am trying to start development using perl and mysql on a suse linux machine. I have managed to install DBI ok from source, but when trying to install the DBD for mysql i get an error:

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. This is typically resolved by:
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 install libz-devel
3.) On other systems, please contact the mailing list

Msql-Mysql-modules@lists.mysql.com
For further hints, see INSTALL.html, section Linker flags. make: *** blib/arch/auto/DBD/mysql/mysql.so Error 1


any ideas please....i am very new to perl dbi......thanks in advance

Replies are listed 'Best First'.
Re: Error installing DBD mysql on linux
by jbrugger (Parson) on Mar 04, 2005 at 20:47 UTC
    It seems to me you are new to linux and make as well, but that won't stop you i hope. Linux rules :-).
    Try the rpm, like perl-DBD-mysql-2.9003-1.i586.rpm for suze (i don't know the exact version you're using, but it seems to me if you have a specific distribution, most modules can be found (and updated) using the package system of that distribution.
    Second, probably all needed dependencies will be shown to you as well.
    I (for example) try to use the deb-files, so a simple apt-get upgrade would update all the perl modules as well.
Re: Error installing DBD mysql on linux
by dragonchild (Archbishop) on Mar 05, 2005 at 03:03 UTC
    libz is used for data compression. It is unlikely, if you did a default install of linux, that you don't have libz installed. I would install that, then try again.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      Thanks alot guys....i managed to install mysql dbd via cpan on command line all works well kinda!! just gettin an erro now.

      Can't locate object method "Execute" via package "DBI::db" at /usr/local/apache2/cgi-bin/project2.cgi line 18.