Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now