Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > Perl
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Perl section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 13th, 2007, 12:32 AM
Registered User
 
Join Date: Jun 2006
Location: Gurgaon, Haryana, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to install a module in local linux machine

Iam new to Perl....

I've the "Win32-GUI-1.05.tar" file & extracted "Win32-GUI-1.05" folder in my home dir.

~/mime/Win32-GUI-1.05.tar
~/mime/Win32-GUI-1.05

:(When Iam trying to use this module, Iam getting below error message. Iam using Win32 module in msgbox.pl ( like, use Win32;)

[pawan@localgfmd pawan]$ perl msgbox.pl
Can't locate Win32.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at msgbox.pl line 1.
BEGIN failed--compilation aborted at msgbox.pl line 1.


kindly tell me the steps to install the module, as other modules already installed in the above mentioned dir. path, what @INC is carrying.

I looked into /usr/lib/perl5/5.8.0 , There are several other .pm files.

:(Whether I've to (copy/move) that module to /usr/lib/perl5/5.8.0 , or create a directory like this /usr/lib/perl5/Win32-GUI-1.05
Or have to do something else....so that @INC should contain the Path of this module with it...

Is there any compulsion.....to always store a module in a specified directory...so that all the modules are placed and accessed from one place.

If this happens.....I'll try to use msgbox utility in perl program...to check the output value of any variable or something.....It's just a try....

Kindly advise....should I go for this or not....

Thanks & Regards,
Pawan Sangal

  #2 (permalink)  
Old April 17th, 2007, 09:22 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

The standard way to install a Perl module on Unix is to change into the directory that was created when you unpacked the .tar.gz file, and then type the following sequence of commands:

        perl Makefile.PL
        make
        make test
        make install

This will create a makefile for you, then compile the module, test it, and put it in the correct location for you. This requires that you are logged in as root, so that you can copy files to the Perl library directory, and various other places on your system where the installation will put files.

If you do not have root permissions on the machine where you want to install the module, such as if you wish to install a module in your home directory, just change one of those commands. Instead of

        perl Makefile.PL

type

        perl Makefile.PL PREFIX=/path/to/where/you/want/it

That will put all the files in that directory. In order to use modules that are stored in that location, you will need to add the following like to your Perl programs:

        use lib /path/to/where/you/want/it


www.crmpicco.co.uk
www.ie7.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retore Db from a remote machine to a local machine srkvellanki BOOK: Beginning SQL 0 October 3rd, 2008 05:17 PM
How to install a module in local linux machine Pawan Sangal Linux 1 April 13th, 2007 01:11 AM
IP Address of a local machine Dilip Nagle Classic ASP Basics 1 September 29th, 2005 10:26 PM
File system object in Local machine askenkray Classic ASP Components 1 January 21st, 2005 04:43 AM
WebRequest on local machine burdickdave C# 0 November 5th, 2003 07:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.