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

Hello Monks,
I've tried installing the DBI and DBD::ODBC modules and problem encountered while installing the same. I've listed below the error "Can't locate DBI.pm in @INC (@INC contains: C:/Perllib C:/Perl/site/lib .)".
Kindly assist

Regards,
Saravanan.S
  • Comment on Problem encountered while installing DBI and DBD::ODBC modules

Replies are listed 'Best First'.
Re: Problem encountered while installing DBI and DBD::ODBC modules
by moritz (Cardinal) on Feb 25, 2009 at 13:29 UTC
    You first have to install DBI. If that works, you can start installing DBD::ODBC.

    At which step did you get the error message you posted? You shouldn't get it once DBI is installed correctl.y

      Hi,
      Thank You, I've installed DBI without any problem, while installing that, the following message gets displayed

      "You are using a perl configured with threading enabled. You should be aware that using multiple threads is not recommended for production environments." But this is not a problem.

      After that, I've started installing the DBD::ODBC, the following error gets displayed.

      "Useless use of private variable in void context at C:\Documents and Settings\anb u\Desktop\Perl modules\DBD-ODBC-1.11\Makefile.PL line 430. Configuring DBD::ODBC ... >>> Remember to actually *READ* the README file! And re-read it if you have any problems. *** Warning: whitespace characters in the current directory path (C:/Documents a nd Settings/anbu/Desktop/Perl modules/DBD-ODBC-1.11) may cause problems *** You're using Microsoft Visual C++ compiler or similar but the LIB and INCLUDE environment variables are not both set. You need to run the VCVARS32.BAT batch file that was supplied with the compiler before you can use it. A copy of vcvars32.bat can typically be found in the following directories under your Visual Studio install directory: Visual C++ 6.0: vc98\bin Visual Studio .NET: vc7\bin Find it, run it, then retry this. If you think this error is not correct then just set the LIB and INCLUDE environment variables to some value to disable the check."

      Regards,
      Saravanan.S

        What part of the advice output don't you understand? You need a C compiler to compile DBD::ODBC and it needs to know where to find it and how to use it - both of which are fixed by following the recommendation made of finding and running vcvars32.bat.

        Remember to actually *READ* the README file! And re-read it if you have any problems.

        So, did you?

Re: Problem encountered while installing DBI and DBD::ODBC modules
by sivaramanm (Acolyte) on Feb 26, 2009 at 09:39 UTC

    latest perl release 5.10 has dbi and dbd:odbc

    install and check it