in reply to Re^3: (Never Ending) Module Installation Issues
in thread (Never Ending) Module Installation Issues

I set the INSTALLBASE, LIB and PREFIX, and after that tried to install Bundle::DBD::mysql from CPAN shell. What I noticed is that it is trying to connect to mysql using my username and password. It obviously does not have my password, and so is trying to login using blank password.

I then try to install it manually using:

perl Makefile.PL --testuser=andy --testpassword=password PREFIX=/home/ +andy
After that it said:

Note (probably harmless): No library found for -lmysqlclient

After that when I try to "make" it, I get plenty of errors, first few lines of which are:

dbdimp.h:22:49: error: mysql.h: No such file or directory + + dbdimp.h:23:45: error: mysqld_error.h: No such file or directory + + dbdimp.h:25:49: error: errmsg.h: No such file or directory
Any suggestions?

Thanks.

Andy

Replies are listed 'Best First'.
Re^5: (Never Ending) Module Installation Issues
by ikegami (Patriarch) on Jun 09, 2010 at 21:29 UTC
    Remember when I said in the CB you needed to install the MySQL client developer's package if you're installing the client from your distro's repo? Well, that hasn't changed.
      Well actually I just managed to resolve this issue.

      I do already have MySQL installed. I had to specify some flags while doing running the Makefile.PL, to specify the location of some MySQL header files that it was complaining about. I obtained the value of the flags by using the mysql_config.

      After that I did make and make install and everything went well.

      One thing again though. DBI once again got installed in some random directory inside ~/perl5/lib/perl5 and I had to manually drag it to ~/perl5/lib/perl5. I had in fact specified PREFIX also while running the Makefile.PL and it seems to have only partly heeded to it (it went inside ~/perl5/lib/perl5). Any ideas what's going on?

      Thanks so much for your help.

        You did use PREFIX=~ LIB=~/lib/perl5, right? It's normal to be in a "random" directory. It's actually the "arch" directory. A module (e.g. Foo::Bar) may install itself into
        $LIB/Foo/Bar.*
        and/or
        $LIB/$ARCH/Foo/Bar.*

        where $LIB is the value passed to LIB=, and $ARCH is some system-specific string.

        In DBD::mysql's case, most if not all the files will be installed in the arch dir.

        As long as PERL5LIB include $LIB, Perl will look into both directories.

        $ echo $PERL5LIB /home/ikegami/lib/perl5 $ perl -V ... @INC: /home/ikegami/lib/perl5/x86_64-linux-gnu-thread-multi /home/ikegami/lib/perl5 ...

        Don't move files around, you're introducing problems!