Solved

How do I use the BerkeleyDB in my perl script in windows?

Posted on 2011-03-21
3
376 Views
Last Modified: 2012-05-11
Hello,

I want to include BerkeleyDB to my perl script.

I add a line in my script as follows:  use BerkeleyDB.

When I am running the script an error mentioning that "Can't locate BerkeleyDB in ......"

The BerkeleyDB is already installed in my windows box.


So how to solve this problem or how to add the library in order to use the berkelyDB functions.


nabil


0
Comment
Question by:nabilhammoud
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
tel2 earned 500 total points
ID: 35186966
Hi nabilhammoud,

My Perl experience is more with Linux than Windows, but I expect the principles are the same.  If it's not installed where all the "core" Perl modules are installed, then you have to put a "use lib" statement before the "use BerkeleyDB;" statement.
I think the "use lib" statement should contain the path to the parent folder of the BerkeleyDB folder.
For example, I use this in Linux:
    use lib "/home/myusername/perl/usr/lib/perl5/site_perl/5.8.8";
Your path will be different of course.  I'm not sure whether you will use forward or back slashes, since you're using Windows.
0
 
LVL 12

Assisted Solution

by:tel2
tel2 earned 500 total points
ID: 35193860
Hi again nabilhammoud,

So the first thing to do is to find where your BerkeleyDB module is installed.

Have you found it?  If you can't find it, maybe it's not installed properly, in which case, try installing it again, and test your script again, without the "use lib..." initially.

Failing that, find it, then follow the instructions in my previous post.
0
 

Author Closing Comment

by:nabilhammoud
ID: 35204543
THX
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question