Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > install module without root access

Reply
Thread Tools

install module without root access

 
 
Nicholas R. Markham
Guest
Posts: n/a
 
      01-27-2004
I'd like to install some modules on a machine on which I'm not root. I know
about using PREFIX= with perl Makefile.pl, and that works fine for the first
module. But if I want to install a module that depends on another module,
which other module I've installed in, say, ~/perl, I get warnings of
prerequisites not found. It seems that Makefile.pl doesn't know enough to
look in the PREFIX directory for modules... Has anyone experienced this and
solved it? Thanks.


 
Reply With Quote
 
 
 
 
Sherm Pendley
Guest
Posts: n/a
 
      01-27-2004
Nicholas R. Markham wrote:

> It seems that Makefile.pl doesn't know enough to
> look in the PREFIX directory for modules...


You have to tell it what you want. Options for doing that are plentiful, but
unfortunately ESP isn't (yet) one of them.

If you're executing Makefile.PL manually, you can use the INC parameter.

If you're using the CPAN shell to manage your modules, you can configure it
to pass the appropriate INC parameter every time it runs Makefile.PL.

You could add your module directory to the PERL5LIB environment variable.

Note that the above aren't identical. You need to decide which is
appropriate for what you want to do - add to the library path for a single
invocation of Makefile.PL, for all such invocations via the CPAN shell, or
for all scripts you run under your login.

sherm--
 
Reply With Quote
 
 
 
 
Gregory Toomey
Guest
Posts: n/a
 
      01-28-2004
Nicholas R. Markham wrote:

Has anyone experienced this
> and
> solved it? Thanks.


Yes, get root access with an ISP that runs User Mode Linux.
http://user-mode-linux.sourceforge.net/uses.html

gtoomey
 
Reply With Quote
 
James Willmore
Guest
Posts: n/a
 
      01-28-2004
On Tue, 27 Jan 2004 16:56:35 -0500, Nicholas R. Markham wrote:

> I'd like to install some modules on a machine on which I'm not root. I
> know about using PREFIX= with perl Makefile.pl, and that works fine for
> the first module. But if I want to install a module that depends on
> another module, which other module I've installed in, say, ~/perl, I get
> warnings of prerequisites not found. It seems that Makefile.pl doesn't
> know enough to look in the PREFIX directory for modules... Has anyone
> experienced this and solved it? Thanks.


Set your PERL5LIB variable in your shell. I have used this method with
zero problems on a Sun box at work - except in cases where core Perl
modules need to be updated (like File::Spec). In that case, you have to
visit your friendly admin and convince him to to upgrade Perl

Also, you'll need to tell your scripts (if the PERL5LIB is not set in the
shell) where your privately installed modules are. I usually use a BEGIN
block to 'push' the needed directories into @INC.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
You have junk mail.


 
Reply With Quote
 
Gunnar Strand
Guest
Posts: n/a
 
      01-28-2004
Try setting the PERL5LIB to ~/perl before you start the
make process. Example i tcsh:

setenv PERL5LIB ~/perl

If you have an internet connection I would recommend
using CPAN directly (if you are installing CPAN modules):

setenv PERL5LIB ~/perl # or ~/perl:${PERL5LIB}
perl -MCPAN -e shell
o conf makepl_arg LIB=~/perl # or PREFIX=~/lib
<install as usual>

I have done this for several users. Works like a charm.

Regards,

/Gunnar

Nicholas R. Markham wrote:
> I'd like to install some modules on a machine on which I'm not root. I know
> about using PREFIX= with perl Makefile.pl, and that works fine for the first
> module. But if I want to install a module that depends on another module,
> which other module I've installed in, say, ~/perl, I get warnings of
> prerequisites not found. It seems that Makefile.pl doesn't know enough to
> look in the PREFIX directory for modules... Has anyone experienced this and
> solved it? Thanks.
>
>


 
Reply With Quote
 
Nicholas R. Markham
Guest
Posts: n/a
 
      01-28-2004
"Sherm Pendley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Nicholas R. Markham wrote:
>
> > It seems that Makefile.pl doesn't know enough to
> > look in the PREFIX directory for modules...

>
> You have to tell it what you want. Options for doing that are plentiful,

but
> unfortunately ESP isn't (yet) one of them.
>
> If you're executing Makefile.PL manually, you can use the INC parameter.
>
> If you're using the CPAN shell to manage your modules, you can configure

it
> to pass the appropriate INC parameter every time it runs Makefile.PL.
>
> You could add your module directory to the PERL5LIB environment variable.
>
> Note that the above aren't identical. You need to decide which is
> appropriate for what you want to do - add to the library path for a single
> invocation of Makefile.PL, for all such invocations via the CPAN shell, or
> for all scripts you run under your login.
>
> sherm--


Ah, $PERL5LIB turned out to be what I was looking for. (At least until they
get the ESP thing working - will that be in Perl 6?) Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing a module written in C on a UNIX without root access hamidrezah@yahoo.com Perl Misc 5 01-04-2009 11:06 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
non root users accessing application installed with root instance hector C Programming 5 12-05-2006 01:01 PM
SRT DIvision, Square root and reciprocal square root alghazo@siu.edu VHDL 0 05-27-2004 06:23 AM
Tertiary Conditional: what does this evaluate to ("docRoot == null ? this.root : doc root")? Rick Osborn Java 10 02-08-2004 02:25 AM



Advertisments