What's the easiest way to install a missing Perl module?

前端 未结 24 2637
情深已故
情深已故 2020-11-21 05:28

I get this error:

Can\'t locate Foo.pm in @INC

Is there an easier way to install it than downloading, untarring, making, etc?

24条回答
  •  旧巷少年郎
    2020-11-21 05:49

    Easiest way for me is this:

    PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install DateTime::TimeZone'
    

    a) automatic recursive dependency detection/resolving/installing

    b) it's a shell onliner, good for setup-scripts

提交回复
热议问题