in reply to How to install Perl modules locally on Unix?
Try using "The bootstrapping technique" from the local::lib docs to install that module. I recently used this on a host without admin rights and without an existing local::lib installation and I don't remember having any trouble. Afterwards I used cpanm -l ~/perl5 Module::Name to install modules there and it worked fine (Update: IIRC the -l ~/perl5 was necessary because I hadn't yet set up the environment variables at that point). In fact, here's a copy-and-paste from the .bash_history with a few irrelevant commands removed:
wget http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/local-lib-2.000 +024.tar.gz tar xzvf local-lib-2.000024.tar.gz cd local-lib-2.000024 perl Makefile.PL --bootstrap make test && make install cd .. rm -rf local-lib-2.000024* cpanm -l ~/perl5 ...
While you should set up the environment variables in .bashrc/.cshrc as described in the local::lib docs, your web server will almost certainly disregard those. IMO it's often easiest to just specify an absolute pathname in your CGI script via use lib '/path/to/modules';, but whether that's always the best approach depends on your circumstances (like in case this script is being deployed on different hosts with different directory structures).
cpanm happened to already be installed there, but in case it isn't, it also has a simple installation option: curl -L https://cpanmin.us | perl - App::cpanminus (see App::cpanminus).
A few edits for clarity.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to install Perl modules locally on Unix?
by slugger415 (Monk) on Nov 27, 2017 at 22:28 UTC | |
by haukex (Archbishop) on Nov 28, 2017 at 08:52 UTC | |
by slugger415 (Monk) on Nov 29, 2017 at 16:40 UTC | |
by haukex (Archbishop) on Dec 02, 2017 at 11:19 UTC | |
by slugger415 (Monk) on Nov 28, 2017 at 19:16 UTC | |
by Your Mother (Archbishop) on Nov 28, 2017 at 19:32 UTC | |
by haukex (Archbishop) on Nov 28, 2017 at 20:11 UTC | |
by slugger415 (Monk) on Nov 28, 2017 at 21:48 UTC | |
|