我想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
。我该怎么办?
答案 0 :(得分:10)
请尝试cpan -fi Net::DNS::SEC
旗帜意味着什么:
f
:强制执行指定操作,通常会失败。即使测试失败,也可以使用它来安装模块。使用此选项时,-i
在您需要强行安装模块时不是可选项。
i
:安装指定的模块。
cpan -h
会为您提供更多详细信息。
答案 1 :(得分:6)
使用-f
选项
来自man cpan
:
-f
强制执行指定操作,通常会失败。即使测试失败,也可以使用它来安装模块。当你使用它 选项,-i
对于在需要时安装模块不是可选的 强迫它:% cpan -f -i Module::Foo