Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Installing Modules Without Root

by listanand (Sexton)
on Aug 04, 2009 at 21:31 UTC ( [id://785906]=perlquestion: print w/replies, xml ) Need Help??

listanand has asked for the wisdom of the Perl Monks concerning the following question:

Dear PerlMonks, I am new to Perl, and I need to install some modules on a machine in which I have no root (or any elevated) privileges. I looked around the internet and it appears that I will be better off using CPAN prompt since it can also install the dependencies, instead of manually installing the modules, and then go around installing the dependencies (also manually). So, I tried using CPAN (perl -MCPAN -e shell) then followed configuration instructions, and then selected a local directory as location for doing Perl Makefile.pl (I chose PREFIX = <local directory> while doing the configuration) and also chose a local directory for 'make install' (using INSTALLMAN3DIR=<local dir>). After this I get to the CPAN prompt. Now when I try to install module (say "install LWP") I get errors towards the very end (something like "make test failed"). What am I missing? Thanks in advance.

Replies are listed 'Best First'.
Re: Installing Modules Without Root
by superfrink (Curate) on Aug 04, 2009 at 21:35 UTC
      Dear Perl Monks,

      Thank you very much for your timely reply.

      This is turning out to be much harder than I thought! I followed the directions given at: http://sial.org/howto/perl/life-with-cpan/non-root/

      After this I go to the CPAN shell and said "install LWP" and at the very end I get an error (below). What am I missing?

      ============ERROR============
      Failed 27/37 test scripts, 27.03% okay. 205/532 subtests failed, 61.47% okay. make: *** test Error 2 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force
      ============END OF ERROR============

        PerlMonks,

        Any thoughts on this? I have spent a lot of time on this seemingly trivial issue, with no success :(

        Thanks again.

      OK so now I have another question :)

      I am in fact going to have to be using a network of computers for running my experiments (and I do not have root on any of them). I don't want to go around installing Perl Modules on every single one of them. What is an efficient way of doing it?

      Thanks yet again.

Re: Installing Modules Without Root
by FunkyMonk (Chancellor) on Aug 04, 2009 at 23:55 UTC
Re: Installing Modules Without Root
by bichonfrise74 (Vicar) on Aug 04, 2009 at 22:46 UTC
Re: Installing Modules Without Root
by Your Mother (Archbishop) on Aug 04, 2009 at 22:30 UTC

    One of the links given already by superfrink mentions it but it's buried and it shouldn't be. To me it's easily the best way to handle this need: local::lib.

      IIRC you probably have a ~/perl or a CPAN preferences file that is interfering, or both. Google around a little before just deleting those but I recognize the error you're getting and I *think* that's how I solved it before.

      (update: I apparently replied to my own node instead of Re^2: Installing Modules Without Root.)

      OK, so now I am trying to use local::lib to install the modules. However as soon as I run the command " perl Makefile.PL --bootstrap=/my_directory_of_choice" , I get the following message:

      Any suggestions?

      == Error Begin ==

      *** Checking for Perl dependencies...

      Core Features

      - ExtUtils::MakeMaker ...too old. (6.30_01 < 6.31)

      - ExtUtils::Install ...too old. (1.33 < 1.43)

      - ExtUtils::CBuilder ...missing.

      - ExtUtils::ParseXS ...missing.

      - Module::Build ...missing. (would need 0.28)

      - CPAN ...too old. (1.7602 < 1.82)

      ==> Auto-install the 6 mandatory module(s) from CPAN? y y

      *** Dependencies will be installed the next time you type 'make'. (You may need to do that as the 'root' user.)

      *** Module::AutoInstall configuration finished.

      *** Installing dependencies...

      *** You are not allowed to write to the directory '/usr/local/share/perl/5.8.8';

      the installation may fail due to insufficient permissions.

      ==> Should we try to re-execute the autoinstall process with 'sudo'? y y

      *** Trying to re-execute the autoinstall process with 'sudo'...

      Password:

      =Error End==

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://785906]
Approved by AnomalousMonk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found