I'm trying to install the DBD::mysql Perl module, but I'm getting an
error I'm not sure how to deal with. They have to do with the linker
flags -lz and -lgz.
I was not able to find either libz or libgz at the Debian packages
site. A Google search was no help. Where can I find these libraries,
in either .deb or tar.gz/.tgz form?
I assume that these flags refer to libz and libgz, but I've come
across stuff to suggest that -lz really refers to zlib, not libz.
Which is it?
P.S. Below is the full output from perl Makefile.PL and make.
This is an experimental version of DBD::mysql. For production
environments you should prefer the Msql-Mysql-modules.
I will use the following settings for compiling and testing:
testpassword (default) =
testhost (default) =
testuser (default) =
nocatchstderr (default) = 0
libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
cflags (guessed) = -I/usr/local/mysql/include
testdb (default) = test
To change these settings, see 'perl Makefile.PL --help' and
Note (probably harmless): No library found for -lgz
Using DBI 1.20 installed in /usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI
Writing Makefile for DBD::mysql
cc -c -I/usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI -I/usr/local/mysql/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.0902\" -DXS_VERSION=\"2.0902\" -fpic -I/usr/local/lib/perl5/5.6.1/i586-linux/CORE dbdimp.c
cc -c -I/usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI -I/usr/local/mysql/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.0902\" -DXS_VERSION=\"2.0902\" -fpic -I/usr/local/lib/perl5/5.6.1/i586-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="/usr/local/mysql/lib:/usr/lib" /usr/local/bin/perl myld cc -shared -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib -lmysqlclient -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
An error occurred while linking the DBD::mysql driver. The error
message seems to indicate that you don't have a libz.a, libgz.a,
libz.so or libgz.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
For further hints, see INSTALL.html, section Linker flags.
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1