【问题标题】:Perl: cpan force install not working in single commandPerl:cpan force install 在单个命令中不起作用
【发布时间】:2018-08-11 04:49:59
【问题描述】:

我想force install 一个 perl 模块。当我这样做时,安装成功:

cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.

cpan[1]> force install Net::DNS::SEC

但是当我这样做时,它会失败:

root@ubuntu:~# cpan force install Net::DNS::SEC

Warning: Cannot install force, don't know what it is.
Try the command

    i /force/ 

...
...

Running make install
  make test had returned bad status, won't install without force    

我需要在单个命令中运行 cpan force install。我该如何进行?

【问题讨论】:

    标签: perl cpan


    【解决方案1】:

    请尝试cpan -fi Net::DNS::SEC

    标志的含义:

    • f:强制执行指定的操作,而通常它会失败。即使测试失败,也可以使用它来安装模块。当您使用此选项时,-i 在您需要强制安装模块时不是可选的。

    • i:安装指定模块。

    cpan -h 将为您提供更多详细信息。

    【讨论】:

      【解决方案2】:

      使用-f 选项

      来自man cpan

      -f 强制执行指定的操作,而它通常会失败。即使测试失败,也可以使用它来安装模块。当你使用这个 选项,-i 在您需要安装模块时不是可选的 强迫它:

                     % cpan -f -i Module::Foo
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-07-24
        • 2016-12-19
        • 1970-01-01
        • 1970-01-01
        • 2021-01-30
        • 1970-01-01
        • 2021-08-10
        相关资源
        最近更新 更多