On 02/20/2007 10:41 AM, Moon, John wrote:
Looking for help installing modules to a "local" library...
http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod says to do
the install one way while README for the module gives other
instructions. CPAN says a) Decompress, b) Unpack, c) Build, and d)
Install. The Build step is different than what the README for the module
instructs.
Below are several attempts.
Any suggestions or links to "How to..." will be greatly appreciated.
SUN83-PRODWEB>pwd
/opt/common/html/billing/cgi-bin/Library/Class-Accessor-0.30
SUN83-PRODWEB>ls
Changes MANIFEST Makefile README lib
INSTALL META.yml Makefile.PL examples t
I think you've become confused between the build directory and the
installation directory. When you unpack the .tar.gz file, a build
directory is automatically created. You go into that build directory and
execute "perl Makefile.PL ..."; that creates the makefile; then you
issue "make install" to install the module's file into the install
directory.
For example, let's say these are the directories you are using:
Build: ~/build/Class-Accessor-0.30
Install: /opt/common/html/billing/cgi-bin/Library
You might do this:
cd ~/build
tar xvzf ~/Class-Accessor-0.30.tar.gz
cd Class-Accessor-0.30 # Go into build directory.
perl Makefile.PL PREFIX=/opt/common/html/billing/cgi-bin/Library
make test # just to see that it's working
make install
In your programs, you might do this to use the module:
use lib '/opt/common/html/billing/cgi-bin/Library';
use Class::Accessor;
SUN83-PRODWEB>perl Makefile.PL
LIB=/opt/common/html/billing/cgi-bin/Library
Writing Makefile for Class::Accessor
SUN83-PRODWEB>/usr/ccs/bin/make
mkdir blib/lib: Permission denied at
/usr/local/lib/perl5/5.8.5/ExtUtils/Command.pm line 186
*** Error code 255
make: Fatal error: Command failed for target `blib/lib/Class/.exists'
SUN83-PRODWEB>
Evidently you don't have permission to write into your build directory,
but the way you're going about it is all wrong anyway.
Create distinct build and installation directories and try to get that
to work. Probably permissions on the web-server directories will stop
you from installing there, so you might have to install the modules to
your home directory or contact the system administrator and ask him to
install them.
Also tries
SUN83-PRODWEB>perl Makefile.PL
PREFIX=/opt/common/html/billing/cgi-bin/Library
Writing Makefile for Class::Accessor
SUN83-PRODWEB>
SUN83-PRODWEB>/usr/ccs/bin/make
mkdir blib/lib: Permission denied at
/usr/local/lib/perl5/5.8.5/ExtUtils/Command.pm line 186
*** Error code 255
make: Fatal error: Command failed for target `blib/lib/Class/.exists'
SUN83-PRODWEB>
SUN83-PRODWEB>/usr/ccs/bin/make install
mkdir blib/lib: Permission denied at
/usr/local/lib/perl5/5.8.5/ExtUtils/Command.pm line 186
*** Error code 255
make: Fatal error: Command failed for target `blib/lib/Class/.exists'
SUN83-PRODWEB>
John W Moon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/