.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBD::MariaDB::INSTALL 3" .TH DBD::MariaDB::INSTALL 3 2023-10-24 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME DBD::MariaDB::INSTALL \- How to install and configure DBD::MariaDB .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& perl Makefile.PL [options] \& make \& make test \& make install .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This document describes the installation and configuration of DBD::MariaDB, the Perl DBI driver for the MariaDB and MySQL database. Before reading on, make sure that you have the prerequisites available: Perl, MariaDB/MySQL and DBI. For details see the separate section "PREREQUISITES". .PP Finally, if you encounter any problems, do not forget to read the section on known problems "KNOWN PROBLEMS". If that doesn't help, you should check the section on "SUPPORT". .SH PREREQUISITES .IX Header "PREREQUISITES" .IP Perl 4 .IX Item "Perl" Preferably a version of Perl, that comes preconfigured with your system. For example, all Linux and FreeBSD distributions come with Perl. For Windows, use ActivePerl or Strawberry Perl . .IP MariaDB/MySQL 4 .IX Item "MariaDB/MySQL" You need not install the actual MariaDB or MySQL database server, the client files and the development files are sufficient. They are distributed either in \&\fIConnector/C\fR package or as part of server package. You need at least MySQL version 4.1.8. .Sp For example, Fedora, RedHat, CentOS Linux distribution comes with RPM files (using YUM) \f(CW\*(C`mariadb\-devel\*(C'\fR, \f(CW\*(C`mariadb\-embedded\-devel\*(C'\fR, \f(CW\*(C`mysql\-devel\*(C'\fR or \&\f(CW\*(C`mysql\-embedded\-devel\*(C'\fR (use \f(CW\*(C`yum search\*(C'\fR to find exact package names). Debian and Ubuntu comes with DEB packages \f(CW\*(C`libmariadb\-dev\*(C'\fR, \f(CW\*(C`libmariadbclient\-dev\*(C'\fR, \&\f(CW\*(C`libmariadbd\-dev\*(C'\fR, \f(CW\*(C`libmysqlclient\-dev\*(C'\fR or \f(CW\*(C`libmysqld\-dev\*(C'\fR (use \&\f(CW\*(C`apt\-cache search\*(C'\fR to find exact package names). .Sp In some cases MariaDB or MySQL libraries depends on external libpcre, libaio, libnuma, libjemalloc or libwrap libraries. If it is that case, they needs to be installed before MariaDB/MySQL libraries. .Sp These are sufficient, if the MariaDB/MySQL server is located on a foreign machine. You may also create client files by compiling from the MariaDB/MySQL source distribution and using .Sp .Vb 1 \& ./configure \-\-without\-server .Ve .Sp or .Sp .Vb 1 \& cmake \-DWITHOUT_SERVER=ON .Ve .Sp If you are using Windows and need to compile from sources (which is only the case if you are not using ActivePerl or Strawberry Perl), then you must ensure that the header and library files are installed. This may require choosing a \&\fICustom installation\fR and selecting the appropriate option when running the MariaDB/MySQL setup program. .IP DBI 4 .IX Item "DBI" DBD::MariaDB is a DBI driver, hence you need DBI. It is available from the same source where you got the DBD::MariaDB distribution from. .IP "C compiler" 4 .IX Item "C compiler" A C compiler is required if you install from source. Make sure, that it is the same C compiler that was used for compiling Perl and MariaDB/MySQL! Otherwise you will almost definitely encounter problems because of differences in the underlying C runtime libraries. .Sp In the worst case, this might mean to compile Perl and MariaDB/MySQL yourself. But believe me, experience shows that a lot of problems are fixed this way. .IP "Gzip libraries" 4 .IX Item "Gzip libraries" Late versions of MySQL and MariaDB come with support for compression. Thus it \&\fBmay\fR be required that you have install an RPM package like \f(CW\*(C`libz\-devel\*(C'\fR, \&\f(CW\*(C`libgz\-devel\*(C'\fR or something similar. .SH "SOURCE INSTALLATION" .IX Header "SOURCE INSTALLATION" So you need to install from sources? If you are lucky, the Perl module \f(CW\*(C`CPAN\*(C'\fR will do all for you, thanks to the excellent work of Andreas König. Otherwise you will need to do a manual installation. All of these installation types have their own section: "CPAN installation", "Manual installation" and "Configuration". .PP The DBD::MariaDB \f(CW\*(C`Makefile.PL\*(C'\fR needs to know where to find your MySQL installation. This may be achieved using command line switches (see "Configuration") or automatically using the \f(CW\*(C`mariadb_config\*(C'\fR or \&\f(CW\*(C`mysql_config\*(C'\fR binary which comes with most MariaDB and MySQL distributions. If your MariaDB or MySQL distribution contains \f(CW\*(C`mariadb_config\*(C'\fR or \f(CW\*(C`mysql_config\*(C'\fR the easiest method is to ensure this binary is on your path. .PP Typically, this is the case if you've installed the mysql library from your systems' package manager. .PP e.g. .PP .Vb 2 \& PATH=$PATH:/usr/local/mysql/bin \& export PATH .Ve .PP As stated, to compile DBD::MariaDB you'll need a C compiler. This should be the same compiler as the one used to build perl AND the MariaDB or MySQL client libraries. If you're on linux, this is most typically the case and you need not worry. If you're on UNIX systems, you might want to pay attention. .PP Also you'll need to get the MariaDB or MySQL client and development headers on your system. The easiest is to get these from your package manager. .PP To run the tests that ship with the module, you'll need access to a running MariaDB or MySQL server. This can be running on localhost, but it can also be on a remote machine. You can use any server version which is greater or equal to 4.1.0. It does not have to be same as version of client library. Also you can use MariaDB client library and MySQL server or vice-versa. .PP On Fedora the process is as follows. In this example we install and start a local server for running the tests against. .PP .Vb 3 \& yum \-y install make gcc mariadb\-devel mariadb\-libs mariadb\-server \& yum \-y install "perl(Test::Deep)" "perl(Test::More)" \& systemctl start mariadb.service .Ve .SS "Environment Variables" .IX Subsection "Environment Variables" For ease of use, you can set environment variables for DBD::MariaDB installation. You can set any or all of the options, and export them by putting them in your .bashrc or the like: .PP .Vb 10 \& export DBD_MARIADB_CFLAGS=\-I/usr/local/mysql/include/mysql \& export DBD_MARIADB_LIBS="\-L/usr/local/mysql/lib/mysql \-lmysqlclient" \& export DBD_MARIADB_CONFIG=mysql_config \& export DBD_MARIADB_TESTDB=test \& export DBD_MARIADB_TESTHOST=127.0.0.1 \& export DBD_MARIADB_TESTPORT=3306 \& export DBD_MARIADB_TESTSOCKET=/var/run/mysqld/mysqld.sock \& export DBD_MARIADB_TESTAUTHPLUGIN=mysql_native_password \& export DBD_MARIADB_TESTUSER=me \& export DBD_MARIADB_TESTPASSWORD=s3kr1+ .Ve .PP The most useful may be the host, database, port, socket, user, and password. .PP Installation will first look to your \f(CW\*(C`mariadb_config\*(C'\fR, your \f(CW\*(C`mysql_config\*(C'\fR, and then your environment variables, and then it will guess with intelligent defaults. .SS "CPAN installation" .IX Subsection "CPAN installation" Installation of DBD::MariaDB can be incredibly easy: .PP .Vb 1 \& cpan DBD::MariaDB .Ve .PP Please note that this will only work if the prerequisites are fulfilled, which means you have a C\-compiler installed, and you have the development headers and mariadb or mysql client libraries available on your system. .PP If you are using the CPAN module for the first time, just answer the questions by accepting the defaults which are fine in most cases. .PP If you cannot get the CPAN module working, you might try manual installation. If installation with CPAN fails because your local settings have been guessed wrong, you need to ensure MariaDB's \f(CW\*(C`mariadb_config\*(C'\fR or MySQL's \f(CW\*(C`mysql_config\*(C'\fR is on your path (see "SOURCE INSTALLATION") or alternatively create a script called \f(CW\*(C`mysql_config\*(C'\fR. This is described in more details later. "Configuration". .SS "Manual installation" .IX Subsection "Manual installation" For a manual installation you need to fetch the DBD::MariaDB source distribution. The latest version is always available from . .PP The name is typically something like .PP .Vb 1 \& DBD\-MariaDB\-.tar.gz .Ve .PP The archive needs to be extracted. On Windows you may use a tool like 7\-zip, on *nix you type .PP .Vb 1 \& tar xf DBD\-MariaDB\-.tar.gz .Ve .PP This will create a subdirectory \fIDBD\-MariaDB\-\fR. Enter this subdirectory and type .PP .Vb 3 \& perl Makefile.PL \& make \& make test .Ve .PP On Windows you may need to replace \f(CW\*(C`make\*(C'\fR with \f(CW\*(C`dmake\*(C'\fR, \f(CW\*(C`gmake\*(C'\fR or \f(CW\*(C`nmake\*(C'\fR. If the tests seem to look fine, you may continue with .PP .Vb 1 \& make install .Ve .PP If the compilation (make) or tests fail, you might need to configure some settings. .PP For example you might choose a different database, the C compiler or the linker might need some flags. "Configuration". "Compiler flags". "Linker flags". .PP For Cygwin there is a special section below. "Cygwin". .SS Configuration .IX Subsection "Configuration" The install script \f(CW\*(C`Makefile.PL\*(C'\fR can be configured via a lot of switches. All switches can be used on the command line. For example, the test database: .PP .Vb 1 \& perl Makefile.PL \-\-testdb= .Ve .PP If you do not like configuring these switches on the command line, you may alternatively create a script called \f(CW\*(C`mariadb_config\*(C'\fR or \f(CW\*(C`mysql_config\*(C'\fR. This is described later on. .PP Available switches are: .IP testdb 4 .IX Item "testdb" Name of the test database, defaults to \fBtest\fR. .IP testuser 4 .IX Item "testuser" Name of the test user, defaults to empty. If the name is empty, then the currently logged in users name will be used. .IP testpassword 4 .IX Item "testpassword" Password of the test user, defaults to empty. .IP testhost 4 .IX Item "testhost" Host name or IP number of the test database; defaults to localhost. .IP testport 4 .IX Item "testport" Port number of the test database; ignored when testhost is set to \&\f(CW\*(C`localhost\*(C'\fR. .IP testsocket 4 .IX Item "testsocket" Unix socket of the test database; takes effect only when testhost is set to \f(CW\*(C`localhost\*(C'\fR. .IP cflags 4 .IX Item "cflags" This is a list of flags that you want to give to the C compiler. The most important flag is the location of the MariaDB or MySQL header files. For example, on Red Hat Linux the header files are in \fI/usr/include/mysql\fR and you might try .Sp .Vb 1 \& \-I/usr/include/mysql .Ve .Sp On Windows the header files may be in \fIC:\emysql\einclude\fR and you might try .Sp .Vb 1 \& \-IC:\emysql\einclude .Ve .Sp The default flags are determined by running .Sp .Vb 1 \& mysql_config \-\-cflags .Ve .Sp More details on the C compiler flags can be found in the following section. "Compiler flags". .IP libs 4 .IX Item "libs" This is a list of flags that you want to give to the linker or loader. The most important flags are the locations and names of additional libraries. For example, on Red Hat Linux your MySQL client libraries are in \fI/usr/lib/mysql\fR and you might try .Sp .Vb 1 \& \-L/usr/lib/mysql \-lmysqlclient \-lz .Ve .Sp On Windows the libraries may be in \fIC:\emysql\elib\fR and .Sp .Vb 1 \& \-LC:\emysql\elib \-lmysqlclient .Ve .Sp might be a good choice. The default flags are determined by running .Sp .Vb 1 \& mysql_config \-\-libs .Ve .Sp More details on the linker flags can be found in a separate section. "Linker flags". .PP If a switch is not present on the command line, then the script \&\f(CW\*(C`mariadb_config\*(C'\fR or \f(CW\*(C`mysql_config\*(C'\fR will be executed. This script comes as part of the MariaDB or MySQL distribution. For example, to determine the C compiler flags, we are executing .PP .Vb 2 \& mysql_config \-\-cflags \& mysql_config \-\-libs .Ve .PP If you want to configure your own settings for cflags or libs, then you have to create a script with same name that provides needed details. .SS "Compiler flags" .IX Subsection "Compiler flags" Note: the following info about compiler and linker flags, you shouldn't have to use these options because \f(CW\*(C`Makefile.PL\*(C'\fR is pretty good at utilizing \&\f(CW\*(C`mariadb_config\*(C'\fR and \f(CW\*(C`mysql_config\*(C'\fR to get the flags that you need for a successful compile. .PP It is typically not so difficult to determine the appropriate flags for the C compiler. The linker flags, which you find in the next section, are another story. .PP The determination of the C compiler flags is usually left to a configuration script called \f(CW\*(C`mysql_config\*(C'\fR, which can be invoked with .PP .Vb 1 \& mysql_config \-\-cflags .Ve .PP When doing so, it will emit a line with suggested C compiler flags, for example like this: .PP .Vb 1 \& \-L/usr/include/mysql .Ve .PP The C compiler must find some header files. Header files have the extension \&\fI.h\fR. MySQL header files are, for example, \fImysql.h\fR and \fImysql_version.h\fR. In most cases the header files are not installed by default. For example, on Windows it is an installation option of the MySQL setup program (Custom installation), whether the header files are installed or not. On Red Hat Linux, you need to install an RPM archive \f(CW\*(C`mariadb\-devel\*(C'\fR, \f(CW\*(C`mariadb\-embedded\-devel\*(C'\fR, \&\f(CW\*(C`mysql\-devel\*(C'\fR or \f(CW\*(C`mysql\-embedded\-devel\*(C'\fR. .PP If you know the location of the header files, then you will need to add an option .PP .Vb 1 \& \-L
.Ve .PP to the C compiler flags, for example \f(CW\*(C`\-L/usr/include/mysql\*(C'\fR. .SS "Linker flags" .IX Subsection "Linker flags" Appropriate linker flags are the most common source of problems while installing DBD::MariaDB. I will only give a rough overview, you'll find more details in the troubleshooting section. "KNOWN PROBLEMS" .PP The determination of the C compiler flags is usually left to a configuration script called \f(CW\*(C`mysql_config\*(C'\fR, which can be invoked with .PP .Vb 1 \& mysql_config \-\-libs .Ve .PP When doing so, it will emit a line with suggested C compiler flags, for example like this: .PP .Vb 1 \& \-L\*(Aq/usr/lib/mysql\*(Aq \-lmysqlclient \-lnsl \-lm \-lz \-lcrypt .Ve .PP The following items typically need to be configured for the linker: .IP "The mariadb/mysqlclient library" 4 .IX Item "The mariadb/mysqlclient library" The MariaDB or MySQL client library comes as part of the MariaDB or MySQL distribution. Depending on your system it may be a file called .Sp .Vb 10 \& libmariadb.a statically linked library, Unix \& libmariadb.so dynamically linked library, Unix \& libmysqlclient.a statically linked library, Unix \& libmysqlclient.so dynamically linked library, Unix \& libmysqld.a statically linked library with embedded server, Unix \& libmysqld.so dynamically linked library with embedded server, Unix \& libmariadbd.a statically linked library with embedded server, Unix \& libmariadbd.so dynamically linked library with embedded server, Unix \& mariadb.lib statically linked library, Windows \& libmariadb.lib statically linked library, Windows \& mariadbclient.lib statically linked library, Windows \& libmariadb.dll dynamically linked library, Windows \& mysqlclient.lib statically linked library, Windows \& mysqlclient.dll dynamically linked library, Windows .Ve .Sp or something similar. .Sp As in the case of the header files, the client library is typically not installed by default. On Windows you will need to select them while running the MySQL setup program (\fICustom installation\fR). On Red Hat Linux an RPM archive \&\f(CW\*(C`mysql\-devel\*(C'\fR or \f(CW\*(C`MySQL\-devel\*(C'\fR must be installed. .Sp The linker needs to know the location and name of the mariadb/mysqlclient library. This can be done by adding the flags .Sp .Vb 1 \& \-L \-lmysqlclient .Ve .Sp or by adding the complete path name. Examples: .Sp .Vb 2 \& \-L/usr/lib/mysql \-lmysqlclient \& \-LC:\emysql\elib \-lmysqlclient .Ve .Sp If you would like to use the static libraries, you need to create a separate directory, copy the static libraries to that place and use the \f(CW\*(C`\-L\*(C'\fR switch above to point to your new directory. For example: .Sp .Vb 7 \& mkdir /tmp/mysql\-static \& cp /usr/lib/mysql/*.a /tmp/mysql\-static \& perl Makefile.PL \-\-libs="\-L/tmp/mysql\-static \-lmysqlclient" \& make \& make test \& make install \& rm \-rf /tmp/mysql\-static .Ve .IP "The gzip library" 4 .IX Item "The gzip library" The MariaDB or MySQL client can use compression when talking to the MariaDB or MySQL server, a nice feature when sending or receiving large texts over a slow network. .Sp On Unix you typically find the appropriate file name by running .Sp .Vb 2 \& ldconfig \-p | grep libz \& ldconfig \-p | grep libgz .Ve .Sp Once you know the name (\fIlibz.a\fR or \fIlibgz.a\fR is best), just add it to the list of linker flags. If this seems to be causing problem you may also try to link without gzip libraries. .SH "MARIADB NATIVE CLIENT INSTALLATION" .IX Header "MARIADB NATIVE CLIENT INSTALLATION" The MariaDB native client is another option for connecting to a MySQL database licensed LGPL 2.1. To build DBD::MariaDB against this client, you will first need to build the client. Generally, this is done with the following: .PP .Vb 4 \& cd path/to/src/mariadb\-native\-client \& cmake \-G "Unix Makefiles\*(Aq \& make \& sudo make install .Ve .PP Once the client is built and installed, you can build DBD::MariaDB against it: .PP .Vb 6 \& perl Makefile.PL \-\-testuser=xxx \-\-testpassword=xxx \e \& \-\-testsocket=/path/to/mysqld.sock \e \& \-\-mariadb_config=/usr/local/bin/mariadb_config \& make \& make test \& make install .Ve .SH "SPECIAL SYSTEMS" .IX Header "SPECIAL SYSTEMS" Below you find information on particular systems: .SS macOS .IX Subsection "macOS" For installing DBD::MariaDB you need to have the libssl header files and the mysql client libs. The easiest way to install these is using Homebrew (). .PP Once you have Homebrew set up, you can simply install the dependencies using .PP .Vb 1 \& brew install openssl mysql\-connector\-c .Ve .PP Then you can install DBD::MariaDB using your cpan client. .SS Cygwin .IX Subsection "Cygwin" If you are a user of Cygwin you already know, it contains a nicely running perl 5.6.1, installation of additional modules usually works like a charm via the standard procedure of .PP .Vb 4 \& perl makefile.PL \& make \& make test \& make install .Ve .PP The Windows binary distribution of MySQL runs smoothly under Cygwin. You can start/stop the server and use all Windows clients without problem. But to install DBD::MariaDB you have to take a little special action. .PP Don't attempt to build DBD::MariaDB against either the MySQL Windows or Linux/Unix distributions: neither will work! .PP You MUST compile the MySQL clients yourself under Cygwin, to get a \&\fIlibmysqlclient.a\fR compiled under Cygwin. Really! You'll only need that library and the header files, you don't need any other client parts. Continue to use the Windows binaries. And don't attempt (currently) to build the MySQL Server part, it is unnecessary, as MySQL AB does an excellent job to deliver optimized binaries for the mainstream operating systems, and it is told, that the server compiled under Cygwin is unstable. .PP Install a MySQL server for testing against. You can install the regular Windows MySQL server package on your Windows machine, or you can also test against a MySQL server on a remote host. .PP \fIBuild MySQL clients under Cygwin:\fR .IX Subsection "Build MySQL clients under Cygwin:" .PP Download the MySQL LINUX source from , unpack \&\fImysql\-.tar.gz\fR into some tmp location and from this directory run configure: .PP .Vb 1 \& ./configure \-\-prefix=/usr/local/mysql \-\-without\-server .Ve .PP This prepares the Makefile with the installed Cygwin features. It takes some time, but should finish without error. The \f(CW\*(C`\-\-prefix\*(C'\fR, as given, installs the whole Cygwin/MySQL thingy into a location not normally in your PATH, so that you continue to use already installed Windows binaries. The \f(CW\*(C`\-\-without\-server\*(C'\fR parameter tells configure to only build the clients. .PP .Vb 1 \& make .Ve .PP This builds all MySQL client parts ... be patient. It should finish finally without any error. .PP .Vb 1 \& make install .Ve .PP This installs the compiled client files under \fI/usr/local/mysql/\fR. Remember, you don't need anything except the library under \fI/usr/local/mysql/lib\fR and the headers under \fI/usr/local/mysql/include\fR! .PP Essentially you are now done with this part. If you want, you may try your compiled binaries shortly; for that, do: .PP .Vb 2 \& cd /usr/local/mysql/bin \& ./mysql \-h 127.0.0.1 .Ve .PP The host (\f(CW\*(C`\-h\*(C'\fR) parameter \f(CW127.0.0.1\fR targets the local host, but forces the mysql client to use a TCP/IP connection. The default would be a pipe/socket connection (even if you say \f(CW\*(C`\-h localhost\*(C'\fR) and this doesn't work between Cygwin and Windows (as far as I know). .PP If you have your MySQL server running on some other box, then please substitute \&\f(CW127.0.0.1\fR with the name or IP-number of that box. .PP Please note, in my environment the \f(CW\*(C`mysql\*(C'\fR client did not accept a simple RETURN, I had to use CTRL-RETURN to send commands ... strange, but I didn't attempt to fix that, as we are only interested in the built lib and headers. .PP At the \f(CW\*(C`mysql>\*(C'\fR prompt do a quick check: .PP .Vb 4 \& mysql> use mysql \& mysql> show tables; \& mysql> select * from db; \& mysql> exit .Ve .PP You are now ready to build DBD::MariaDB! .PP \fIcompile DBD::MariaDB\fR .IX Subsection "compile DBD::MariaDB" .PP Download and extract \fIDBD\-MariaDB\-.tar.gz\fR from CPAN, \f(CW\*(C`cd\*(C'\fR into unpacked dir \fIDBD\-MariaDB\-\fR you probably did that already, if you are reading this! .PP .Vb 1 \& cp /usr/local/mysql/bin/mysql_config . .Ve .PP This copies the executable script mentioned in the DBD::MariaDB docs from your just built Cywin/MySQL client directory; it knows about your Cygwin installation, especially about the right libraries to link with. .PP .Vb 1 \& perl Makefile.PL \-\-testhost=127.0.0.1 .Ve .PP The \f(CW\*(C`\-\-testhost=127.0.0.1\*(C'\fR parameter again forces a TCP/IP connection to the MySQL server on the local host instead of a pipe/socket connection for the \&\f(CW\*(C`make test\*(C'\fR phase. .PP .Vb 1 \& make .Ve .PP This should run without error .PP .Vb 2 \& make test \& make install .Ve .PP This installs DBD::MariaDB into the Perl hierarchy. .SH "KNOWN PROBLEMS" .IX Header "KNOWN PROBLEMS" .SS "no gzip on your system" .IX Subsection "no gzip on your system" Some Linux distributions don't come with a gzip library by default. Running \&\f(CW\*(C`make\*(C'\fR terminates with an error message like .PP .Vb 8 \& LD_RUN_PATH="/usr/lib/mysql:/lib:/usr/lib" gcc \& \-o blib/arch/auto/DBD/mysql/mysql.so \-shared \& \-L/usr/local/lib dbdimp.o mysql.o \-L/usr/lib/mysql \& \-lmysqlclient \-lm \-L/usr/lib/gcc\-lib/i386\-redhat\-linux/2.96 \& \-lgcc \-lz \& /usr/bin/ld: cannot find \-lz \& collect2: ld returned 1 exit status \& make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1 .Ve .PP If this is the case for you, install an RPM archive like \f(CW\*(C`libz\-devel\*(C'\fR, \&\f(CW\*(C`libgz\-devel\*(C'\fR, \f(CW\*(C`zlib\-devel\*(C'\fR or \f(CW\*(C`gzlib\-devel\*(C'\fR or something similar. .SS "different compiler for mysql and perl" .IX Subsection "different compiler for mysql and perl" If Perl was compiled with gcc or egcs, but MySQL was compiled with another compiler or on another system, an error message like this is very likely when running \f(CW\*(C`make test\*(C'\fR: .PP .Vb 5 \& t/00base............install_driver(mysql) failed: Can\*(Aqt load \& \*(Aq../blib/arch/auto/DBD/mysql/mysql.so\*(Aq for module DBD::MariaDB: \& ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: _umoddi3 \& at /usr/local/perl\-5.005/lib/5.005/i586\-linux\-thread/DynaLoader.pm \& line 168. .Ve .PP This means, that your linker doesn't include \fIlibgcc.a\fR. You have the following options: .PP The solution is telling the linker to use \f(CW\*(C`libgcc\*(C'\fR. Run .PP .Vb 1 \& gcc \-\-print\-libgcc\-file .Ve .PP to determine the exact location of \fIlibgcc.a\fR or for older versions of gcc .PP .Vb 1 \& gcc \-v .Ve .PP to determine the directory. If you know the directory, add a .PP .Vb 1 \& \-L \-lgcc .Ve .PP to the list of C compiler flags. "Configuration". "Linker flags". .SH SUPPORT .IX Header "SUPPORT" Finally, if everything else fails, you are not alone. First of all, for an immediate answer, you should look into the archives of the dbi-users mailing list, which is available at Perl DBI Users' Forum . .PP To subscribe to this list, send and email to \&\f(CW\*(C`dbi\-users\-subscribe@perl.org\*(C'\fR . .PP If you don't find an appropriate posting and reply in the mailing list, please post a question. Typically a reply will be seen within one or two days.