Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上,我在 Ubuntu 和 OS X 上试过这个:
export PERL_LOCAL_LIB_ROOT=~/.perl5 wget -O- http://cpanmin.us | perl - -l ~/.perl5 App::cpanminus local::lib eval `perl -I ~/.perl5/lib/perl5 -Mlocal::lib`
然而第三行坚持创建和安装所有的东西,~/perl5而不是~/.perl5. 我该如何克服这种行为?
~/perl5
~/.perl5
从文档中,
[如果您将 local::lib 安装到] 默认目录以外的目录中,您还需要将其作为导入参数提供给 local::lib 模块的调用,如下所示: echo 'eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc
[如果您将 local::lib 安装到] 默认目录以外的目录中,您还需要将其作为导入参数提供给 local::lib 模块的调用,如下所示:
echo 'eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc
所以你需要
echo 'eval "$(perl -I$HOME/.perl5/lib/perl5 -Mlocal::lib=$HOME/.perl5)"' >>~/.bashrc