Rectangle 27 0

perl Can't locate in @INC during CPAN dependency install performed not as root?


I used -I to add my non-root lib to @INC. Once the CPAN got to the primary module, it couldn't find the required recently installed modules because that instance of @INC didn't contain my directory. I didn't try setting PERL5LIB, which worked. local::lib is not installed on that machine, but soon will be! Thanks for the info.

Note
Rectangle 27 0

perl Can't locate in @INC during CPAN dependency install performed not as root?


PERL5LIB='/v1/data/site_perl' perl -MCPAN -e 'install Log::Dispatch'

Another strategy to consider is to simply build a complete Perl installation in your local directory -- then use that perl's CPAN utilities. They will already have all your own paths built-in. This is the way I tend to do it.

I believe CPAN.pm likes to call a lot of sub-processes for various tasks, and these end up starting new perls, which will not inherit your -I flag. Instead, try setting a PERL5LIB environment variable, e.g.

Note
Rectangle 27 0

perl Can't locate in @INC during CPAN dependency install performed not as root?


PERL5LIB='/v1/data/site_perl' perl -MCPAN -e 'install Log::Dispatch'

Another strategy to consider is to simply build a complete Perl installation in your local directory -- then use that perl's CPAN utilities. They will already have all your own paths built-in. This is the way I tend to do it.

I believe CPAN.pm likes to call a lot of sub-processes for various tasks, and these end up starting new perls, which will not inherit your -I flag. Instead, try setting a PERL5LIB environment variable, e.g.

Note