Solved

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

Posted on 2011-03-21
3
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…

752 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