http://www.perlmonks.org?node_id=1194357


in reply to Install Module with no admin permission

While the latest local::lib lists an ExtUtils::MakeMaker prerequisite of 7.00, it will usually work with versions back to 6.31. The newer prerequisite is because EUMM has changed how it parses some options, and local::lib produces the newer format. However, if you are only dealing with simple paths with no spaces or other special characters, the output of local::lib will work with older EUMM versions. If it is too much trouble trouble to get a newer EUMM, you can ignore the prerequisite warning.

The --shelltype option requires local::lib 2.0. Without that option, local::lib does shell detection based on the SHELL environment variable. In your environment, the older version is detecting your shell properly.

local::lib is meant to help with installing libraries in a separate directory, but it can't help with installing prerequisites. Since your machine is isolated from the internet, you'll need to either use a minicpan type solution, or resolve the prerequisites yourself by recursively installing them.

Replies are listed 'Best First'.
Re^2: Install Module with no admin permission
by marto (Cardinal) on Jul 06, 2017 at 09:44 UTC

    Thanks for the clarificaiton, are you happy with the bootstrapping of local:lib/EUMM I suggested? With some rewording and a little work I'd be happy to raise a PR to add this to the documentation.

      Your suggestion included the --bootstrap option, which is primarily meant to download and install toolchain modules new enough for everything to work with local::lib. Your instructions include first upgrading ExtUtils::MakeMaker, but if an older CPAN.pm or Module::Build installed, the bootstrap process will try to upgrade them which in this case won't work. The bootstrapping process will ignore the failure and continue though. Also, the -I path used is wrong, but unnecessary. The proper paths to load the newly installed modules would be $HOME/perl5/lib/perl5, not $HOME/perl5/lib. But just passing a -I option wouldn't help the commands run by make find the newly installed ExtUtils::MakeMaker and its helper modules. The --bootstrap option takes care of getting the library paths set properly.

      My suggestion for manual bootstrapping from pre-downloaded files would probably be to extract both local::lib and ExtUtils::MakeMaker, then install with:

      eval `perl -I"$LOCAL_LIB_EXTRACTED_DIR/lib" -Mlocal::lib` cd $EXTUTILS_MAKEMAKER_EXTRACTED_DIR perl Makefile.PL && make test && make install cd $LOCAL_LIB_EXTRACTED_DIR perl Makefile.PL && make test && make install

        Ah, yes, this is much cleaner! Would it be possible to add this to the documentation? If I could add one thing it'd be wget, extraction and cd lines, purely so that the note would a complete end to end process people could follow. Thanks.

        Tnx, Honestly ... most of the Info u wrote is not really clear for me , as i never deal with Perl installation but coding onlyu Tried:

        [xxxxx@xxxx ExtUtils-MakeMaker-7.30]$ eval `perl -I"/testusers/env/tes +t/nadavp/perl5/lib" -Mlocal::lib` Bad : modifier in $ (/).

        Also:

        xxxp@illxxx ExtUtils-MakeMaker-7.30]$ ksh Hello !!!! $ export LOCAL_LIB_EXTRACTED_DIR=/testusers/env/test/nadavp/perl5 $ eval `perl -I"$LOCAL_LIB_EXTRACTED_DIR/lib" -Mlocal::lib` ksh: eval: line 1: ${?PERL_LOCAL_LIB_ROOT}: bad substitution