胖鸭 2009-05-22 16:36
浏览 209
已采纳

如何告诉 CPAN 安装所有的依赖项?

How do I tell CPAN to install all dependencies?

I tried setting these in cpan:

cpan> o conf prerequisites_policy follow
cpan> o conf commit

I still had to answer "y" a couple of times (but fewer than before it feels like).

Is there a way to get it to always go ahead and install? I want to make it unattended.

It would seem that I want a flag to always trust CPAN to do the right thing, and if it suggests an answer I would like to follow it (always hit <kbd>Enter</kbd> when it asks something).

转载于:https://stackoverflow.com/questions/898782/how-do-i-tell-cpan-to-install-all-dependencies

  • 写回答

10条回答 默认 最新

  • 笑故挽风 2014-02-12 18:18
    关注

    Here is the one-liner making these changes permanent including automatic first-time CPAN configuration:

    perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit'
    

    Or combine it with local::lib module for non-privileged users:

    perl -MCPAN -Mlocal::lib=~/perl5 -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit'
    

    Run it before using the CPAN shell or whatever.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(9条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度