Installing PERL CPAN modules in local directory

前端 未结 5 998
一生所求
一生所求 2020-12-25 08:11

i have a 1and1 hosting account and would like to install some Perl CPAN modules that are not part of the standard host package. Is it possible to install modules without ROO

相关标签:
5条回答
  • 2020-12-25 08:25

    This is an excellent article about installing perl modules as a regular (non-root) user:

    Installing Perl Modules as a Non-Root User

    0 讨论(0)
  • 2020-12-25 08:34

    As already said: local::lib

    cpanm  --local-lib=~/Program/Perl/Lib Tk 
    
    0 讨论(0)
  • 2020-12-25 08:41

    cpanminus is quickly becoming the choice interface for CPAN. It supports installing packages in to the user's home directory.

    Its usage is frightening simple. To install the cpanminus package locally:

    curl -L http://cpanmin.us | perl - App::cpanminus
    

    To install an arbitrary package:

    curl -L http://cpanmin.us | perl - Lingua::Romana::Perligata
    

    Remember to add the user's local library to the PERL5LIB environment variable.

    export PERL5LIB=$HOME/perl5/lib/perl5:$PERL5LIB
    
    0 讨论(0)
  • 2020-12-25 08:42

    I would suggest you use perlbrew and install a whole build of Perl in your account, not just modules. Less headaches that way, especially when the provider decides to update the system Perl.

    0 讨论(0)
  • 2020-12-25 08:48

    For installing modules to a local directory, you can use local::lib.

    0 讨论(0)
提交回复
热议问题