CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
installing perl module



Jan 16, 2001, 5:22 PM

Post #1 of 2 (1591 views)
installing perl module Can't Post

I have uploaded my website to my host and found out that they do not support the DB_File module by Berkley nor do they have the berkley software installed. How can I install the module in my site directory without accessing root?

Administrator / Moderator

Jan 16, 2001, 8:41 PM

Post #2 of 2 (1589 views)
Re: installing perl module [In reply to] Can't Post

Assuming you're on a *nix server with telnet access, below are some instructions for local module installation. This

However, if any modules have other dependencies, like MySQL or Oracle or other root programs being installed/updated, then the following won't help.

The first step is to create the directory to store local modules, and create 4 subdirectories in that new directory: man1, man3, bin, and scripts.

Then, get the distribution of the module that needs to be installed from CPAN. gunzip and untar it into a temporary directory.

After it's been extracted, the following command needs to be issued at the command prompt for local installation:

perl Makefile.PL LIB = /home/perlarchive/site_modules \ 
INSTALLMAN1DIR = /home/perlarchive/site_modules/man1 \
INSTALLMAN3DIR = /home/perlarchive/site_modules/man3 \
INSTALLBIN = /home/perlarchive/site_modules/bin \
INSTALLSCRIPTS = /home/perlarchive/site_modules/scripts

These paths should directly correspond with the directories created in the first step. The important thing with this command is to always remember to put the \ at the end all lines but the last one, which gives the ability to have a multiline input.

Then hit enter. You should see see the screen go crazy with various downloading, installation and testing messages. Try to scan the fast-moving text for possible error messages and jot them down.

Then type "make" [enter] "make test" [enter] "make install". And yeah, I mean to hit the enter key, not type "[enter]".

If no errors occured during installation, the temporary directory and all its content can be deleted at this point. Possible errors are that the installation directories don't exist, broken module dependencies (for example, the XML::Parser requires the Expat module to be installed first), etc.

After local installation, you need to let the program know where these local modules are. This can be done by entering either of these 2 lines into the program:

use lib '/home/perlarchive/site_modules';


push @INC, '/home/perlarchive/site_modules';

(This post was edited by Jasmine on Apr 20, 2001, 8:32 PM)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives