Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats does the Perl error "Can't locate Net/SSH/Perl.pm" mean?

Tags:

ssh

perl

I am running a perl script that uses SSH, but it prints the following error:

Can't locate Net/SSH/Perl.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at newone.pl line 3. BEGIN failed--compilation aborted at newone.pl line 3.

Perl can't seem to locate Net/SSH/Perl.pm. Why can't it find it and how do I install it?

like image 752
Hellos Avatar asked Aug 10 '11 13:08

Hellos


2 Answers

Your code is fine, although I haven't checked it as the error is due to a missing perl module.

What's the easiest way to install a missing Perl module?

like image 131
Bruce Avatar answered Sep 28 '22 01:09

Bruce


You need to install and/or include the appropriate SSH library for perl. You can install it using this command:

cpan install Net::SSH::Perl

like image 32
Alex Avatar answered Sep 27 '22 23:09

Alex