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

I'm trying to get DBD::SQLite to make on a server that has DBI version 1.18 all ready installed on the system and DBI 1.21 installed on my user directory. It keeps trying to use the older version, and I'm not sure how to change my paths in such a way to get it to use the newer one.

I have DBI 1.21 installed in:

/home/talbert/lib

and I have that in my path. DBI 1.18 is installed here

/usr/local/perl5.6.1/lib/site_perl/sun4-solaris/auto/DBI

When I run perl Makefile.PL I get the following error:
rintintin> perl Makefile.PL PREFIX=/home/talbert Checking if your kit is complete... Looks good Warning: prerequisite DBI 1.21 not found at /usr/local/perl5.6.1/lib/E +xtUtils/MakeMaker.pm line 343. Using DBI 1.18 installed in /usr/local/perl5.6.1/lib/site_perl/sun4-so +laris/auto/DBI Writing Makefile for DBD::SQLite

this is my current enviroment:
rintintin> env HOME=/home/talbert USER=talbert LOGNAME=talbert PATH=/home/talbert/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/ccs/ +bin:/home/talbert/lib:/lib/site_perl/sun4-solaris/ MAIL=/var/spool/mail/talbert SHELL=/usr/local/bin/tcsh TZ=US/Mountain SSH2_CLIENT=128.138.149.172 62077 128.138.129.243 22 TERM=vt100 SSH2_SFTP_LOG_FACILITY=-1 LM_LICENSE_FILE=/usr/opt/SUNWspro/license_dir/sunpro.lic,sp OPENWINHOME=/usr/openwin LD_LIBRARY_PATH=/usr/opt/SUNWspro/lib:/usr/openwin/lib:/home/talbert/l +ib EDITOR=vim WEBSTERHOST=webster.Colorado.EDU HOSTTYPE=sun4 VENDOR=sun OSTYPE=solaris MACHTYPE=sparc SHLVL=1 PWD=/home/talbert/DBD-SQLite-0.31 GROUP=student HOST=rintintin.colorado.edu REMOTEHOST=tcom149-172.colorado.edu MANPATH=/usr/local/man:/usr/man:/home/talbert/man SHLIB_PATH=/usr/opt/SUNWspro/lib:/usr/openwin/lib:/home/talbert/lib LIBPATH=/usr/opt/SUNWspro/lib:/usr/openwin/lib:/home/talbert/lib

Replies are listed 'Best First'.
Re: Trying to get DBD::SQLite to compile with local version of DBI library
by ikegami (Patriarch) on Jun 22, 2009 at 18:14 UTC

    Both of the following commands will show that perl doesn't look in /home/talbert/lib:

    perl -le'print for @INC'
    perl -V (uppercase V, list near the bottom under "@INC:")

    Add export PERL5LIB=/home/talbert/lib to your login script and login back in. See perlrun (for PERL5VAL), @INC and lib.


    Note that lib/perl5 is usually used as the installation directory, not just lib. Modules can be installed there using

    perl Makefile.PL PREFIX=~ LIB=~/lib/perl5
    or (in newer ExtUtils::MakeMaker)
    perl Makefile.PL INSTALL_BASE=~
      Thank you for the response, it makes much more sense now. I was able to make DBD::SQLite with DBI 1.21 like I was hoping to.