Cannot be found in @INC during installation of CPAN dependencies not root

When trying to do:

perl -I'/v1/data/site_perl' -MCPAN -e 'install Log::Dispatch';

I keep getting "Can't find Params / Validate.pm at @INC." When viewing the output, / v 1 / data / site_perl is NOT displayed in the displayed @INC, although I used -I.

I am not root, so I changed the configuration of CPAN so that:

'makepl_arg' => q[LIB=/v1/data/site_perl INSTALLSITEMAN1DIR=/v1/data/site_perl/man/man1 INSTALLSITEMAN3DIR=/v1/data/site_perl/man/man3 INSTALLMAN1DIR=/v1/data/site_perl/man/man1 INSTALLMAN3DIR=/v1/data/site_perl/man/man3]

So even the lib is installed.

In the base script, I have:

use lib '/v1/data/site_perl';
use Params::Validate;

No problem.

How do I make Log :: Dispatch use lib / v1 / data / site_perl without setting a force? What am I missing?

+3
source share
2 answers

, CPAN.pm , perl s, -I. PERL5LIB, .

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

, , - Perl , perl CPAN. . .

+3

CPAN -I. local::lib .

+2

Source: https://habr.com/ru/post/1740824/


All Articles