I want to force install
a perl module. When I do this, the installation succeeds:
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan[1]> force install Net::DNS::SEC
But when I do this, it fails:
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
I need to run the cpan force install
in a single command. How do I proceed?
To install Perl modules using CPAN, you need to use the cpan command-line utility. You can either run cpan with arguments from the command-line interface, for example, to install a module (e.g Geo::IP) use the -i flag as shown.
Please try cpan -fi Net::DNS::SEC
What the flags mean:
f
: Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail. When you use this option,-i
is not optional for installing a module when you need to force it.
i
: Install the specified modules.
cpan -h
would provide you more details.
use the -f
option
From man cpan
:
-f
Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail. When you use this option,-i
is not optional for installing a module when you need to force it:% cpan -f -i Module::Foo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With