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

I'm using DB_FILE in one of my scripts. When I run it I get this error:

"Can't locate DB_FILE.pm in @INC"

I've installed Berkeley DB in /usr/local/berkeleydb. These are the steps I used to install it.
1. copied .tar.gz to /usr/local/src
2. unzipped it tar file
3. cd to the extracted folder
4. cd build_unix
5. ../dist/configure --prefix=/usr/local/berkeleydb
6. make
7. make install
8. echo /usr/local/bdb/lib >> /etc/ld.so.conf
9. ldconfig
Everything was executed correctly. I searched the installation folder this DB_FILE.pm but can't find it. Even if i use "use lib '/usr/local/berkeleydb'" in my script, I get this error. Please help.

Replies are listed 'Best First'.
Re: "Can't locate DB_FILE.pm in @INC"
by Corion (Patriarch) on Dec 01, 2009 at 13:17 UTC

    The module is named DB_File, not DB_FILE.

      Thanks. You're right :). I wasted hours trying to figure it out.