Manual installation of a Perl Module

前端 未结 3 899
孤独总比滥情好
孤独总比滥情好 2020-12-03 03:28

I have downloaded the module Digest::SHA1 and extracted it to a directory (../Digest-SHA1-2.13/) , then copied all the SHA1.* files into (../Digest-SHA1-2.13/Di

3条回答
  •  失恋的感觉
    2020-12-03 03:58

    Use this recipe for manually installing perl modules:

    tar zxf Digest-SHA1-2.13.tar.gz
    cd Digest-SHA1-2.13
    perl Makefile.PL
    make
    make test
    make install
    

    Note that some distributions will have a Build.PL file instead of Makefile.PL. In that case use this recipe:

    tar zxf ...
    cd ...
    perl Build.PL
    ./Build
    ./Build test
    ./Build install
    

    (You may be able to get by with just running make install and ./Build install.)

    If you need to alter the installation dir then use:

    perl Makefile.PL INSTALL_BASE=...
    

    or

    perl Build.PL --install_base ...
    

    depending on the kind of module.

    For more info see the perldoc for ExtUtils::MakeMaker::FAQ and Module::Build

提交回复
热议问题