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

前端 未结 24 2648
情深已故
情深已故 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:37

    Many times it does happen that cpan install command fails with the message like "make test had returned bad status, won't install without force"

    In that case following is the way to install the module:

    perl -MCPAN -e "CPAN::Shell->force(qw(install Foo::Bar));"
    

提交回复
热议问题