0

I'm currently trying to install a Perl module, but the web hosting has specifically locked the custom Perl user install directory (they have a "install service" charging 7$ per module).

So what I have done, is this:

o conf makepl_arg INSTALL_BASE=~/USERNAME/lib
o conf mbuildpl_arg "--install_base ~/USERNAME/lib"
o conf makepl_arg "PREFIX=~/USERNAME/lib"

Then when running, I try:

perl -MCPAN -e 'use lib "~/USERNAME/lib";shell;'

I try to install, it refuses to search my custom lib dir:

Running install for module 'Canary::Stability'
Checksum for /www/webvol28/dt/ziz4exwdzkng352/.cpan/sources/authors/id/M/ML/MLEHMANN/Canary-Stability-2013.tar.gz ok
Configuring M/ML/MLEHMANN/Canary-Stability-2013.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Canary::Stability
Writing MYMETA.yml and MYMETA.json
  MLEHMANN/Canary-Stability-2013.tar.gz
  /usr/local/bin/perl Makefile.PL PREFIX=~/USERNAME/lib -- OK
Running make for M/ML/MLEHMANN/Canary-Stability-2013.tar.gz
cp Stability.pm blib/lib/Canary/Stability.pm
Manifying 1 pod document
  MLEHMANN/Canary-Stability-2013.tar.gz
  /usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for MLEHMANN/Canary-Stability-2013.tar.gz
PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t .. ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.00 cusr  0.01 csys =  0.05 CPU)
Result: PASS
  MLEHMANN/Canary-Stability-2013.tar.gz
  /usr/bin/make test -- OK
Running make install for MLEHMANN/Canary-Stability-2013.tar.gz
Manifying 1 pod document
Appending installation info to /www/webvol28/dt/ziz4exwdzkng352/USERNAME/lib/lib/perl5/5.32/mach/perllocal.pod
  MLEHMANN/Canary-Stability-2013.tar.gz
  /usr/bin/make install  -- OK
  MLEHMANN/JSON-XS-4.03.tar.gz
  Has already been unwrapped into directory /www/webvol28/dt/ziz4exwdzkng352/.cpan/build/JSON-XS-4.03-7
Configuring M/ML/MLEHMANN/JSON-XS-4.03.tar.gz with Makefile.PL
Can't locate Canary/Stability.pm in @INC (you may need to install the Canary::Stability module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32 .) at Makefile.PL line 4.
BEGIN failed--compilation aborted at Makefile.PL line 4.
Warning: No success on command[/usr/local/bin/perl Makefile.PL PREFIX=~/USERNAME/lib]
  MLEHMANN/JSON-XS-4.03.tar.gz
  /usr/local/bin/perl Makefile.PL PREFIX=~/USERNAME/lib -- NOT OK
Failed during this command:
 (optional) MLEHMANN/JSON-XS-4.03.tar.gz      : writemakefile NO '/usr/local/bin/perl Makefile.PL PREFIX=~/USERNAME/lib' returned status 512

You can see it successfully install the prerequisite Canary::Stability, but then fails to load it subsequently:

Can't locate Canary/Stability.pm in @INC (you may need to install the Canary::Stability module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32 .) at Makefile.PL line 4.

Tried in the lib folder and such too, but it doesn't help. It seems only to search the "official" folders which are permission locked so only web hosting admin can install.

Any idea how to "force" the install scripts to find my custom folder?

6
  • Add ~/USERNAME/lib to $PERL5LIB (are you sure there's a slash after the tilde?)
    – choroba
    Commented May 16, 2023 at 9:25
  • Still doesn't work. And yes, there is a slash after the tilde. Commented May 16, 2023 at 9:38
  • "web hotel have specifically locked the custom perl user install directory (they have a "install service" charging 7$ per module)." - what is a web hotel?
    – DavidPostill
    Commented May 16, 2023 at 9:48
  • A web hotel is a rented space in a server to host a website. Commented May 16, 2023 at 9:49
  • 2
    Web hosting, not hotel.
    – Destroy666
    Commented May 16, 2023 at 9:50

1 Answer 1

0

You simply need to export PERL5LIB:

export PERL5LIB='/www/webvol28/dt/ziz4exwdzkng352/USERNAME/lib/'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .