Solved

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

Posted on 2011-03-21
3
383 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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 …
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…

685 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