FreeKB - Perl (Scripting) Install a module using cpan
Perl (Scripting) - Install a module using cpan

Before installing a module, you may want to use the perldoc command to determine if the module is installed.

perldoc -l Net::SSH:Perl


Or this command.

perl -MNet::SSH::Perl -e 'print $INC{"Net/SSH/"}'


I always first try to using cpanm, and then use cpan if there is some issue with cpanm.


Start the cpan interactive prompt.



Then, use the install module_name (or force install) command to install a module. In this example, the SSH module is installed.

cpan> install Net::SSH::Perl


If the install fails, you can try with the force option.

cpan> force install Net::SSH::Perl


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 65d42 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |