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

Hi monks,

I have been trying yesterday to install the DBD::mysql module. DBI is already installed, but DBD::mysql fails with the following errors:

The errors is a text file

I also downloaded it locally and tried to build it manually but it failed for the same reason.

Has anyone hasd as imilar problem? How can this be resolved?

I do not know my way much around perl, just starting to play around with it. I cannot decipher the error message.

I am running RedHat 9 with the standard perl that comes with it and a DBI version installed just yesterday form the cpann shell...

Many thanks in advance,
nmk

Replies are listed 'Best First'.
Re: Problem with DBD::mysql install
by robartes (Priest) on Apr 08, 2003 at 06:21 UTC
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
    This suggests to me that either MySQL is not installed, or it is installed in a location that is not in your path. Try rpm -qa |grep -i mysql (don't know the exact package name, but this brute force method should find it if it's installed) to find out if mysql is installed.

    CU
    Robartes-

      I installed MySQL 4 fom the binary distribution on their site. It is in /usr/local/mysql... How do I point the cpan installer to this location?

      Or what do I have to do for a manual install? Which options have to be set?

      nmk

        You need to make sure the CPAN installer finds the mysql-config script (or is it a binary). Put /usr/local/mysql/bin (or wherever it lives in your PATH):
        export PATH=$PATH:/usr/local/mysql/bin
        or, if you use a csh-like shell:
        setenv PATH $PATH:/usr/local/mysql/bin

        CU
        Robartes-

Re: Problem with DBD::mysql install
by PodMaster (Abbot) on Apr 09, 2003 at 06:46 UTC
    In the future, just paste all the errors in your post. It's rarely a good idea to not do that.
    Has anyone hasd as imilar problem? How can this be resolved?
    I'd say lots of people --- This can be solved by reading. I will now quote from the errors you posted
    I will use the following settings for compiling and testing:
     
      cflags        (guessed) = -I/usr/local/mysql/include
      libs          (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
      nocatchstderr (default) = 0
      ssl           (guessed) = 0
      testdb        (default) = test
      testhost      (default) =
      testpassword  (default) =
      testuser      (default) =
     
    To change these settings, see 'perl Makefile.PL --help' and
    'perldoc INSTALL'.
     
    See the part in bold? You need to do that. You can also find INSTALL at http://search.cpan.org/src/JWIED/DBD-mysql-2.1026/INSTALL.html. The instructions are pretty short. Good luck.

    update: Also, besides all CPAN common practices, it's always a good idea to read the README/INSTALL files before attempting to install any modules, particularly ones which require a compiler.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.