Installing PERL CPAN modules in local directory

半城伤御伤魂 提交于 2019-11-30 02:13:06

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

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.

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

Installing Perl Modules as a Non-Root User

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!