?
Solved

Can't locate Net/SFTP.pm in

Posted on 2004-11-04
7
Medium Priority
?
5,609 Views
Last Modified: 2008-01-09
New user

I am getting the following error message:
Can't locate Net/SFTP.pm in @INC (@INC contains: ../lib.
/usr/lib/perl5/5.6.1/i586-linu

BEGIN failed—compilation aborted at …. line 3


line 3 has "use Net::SFTP;

    use Net::SFTP;
 
    $host = ' xxx';
    $userb = ' yyy ';
    $pass = ' zzz';
    my $sftp = Net::SFTP->new($host);
    $sftp->login($user, $pass);

Can anyone say what could be wrong? Need immediate answer
0
Comment
Question by:dbruk
  • 2
  • 2
5 Comments
 
LVL 18

Accepted Solution

by:
kandura earned 1000 total points
ID: 12497273
you need to install Net::SFTP.

run
    perl -MCPAN -e 'install Net::SFTP'
on a shell (as root), and you should be good to go.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12497525
or if you did install Net::SFTP, explain how you installed it.
0
 
LVL 3

Expert Comment

by:nochkin
ID: 12529423
Net::SMTP is a part of libnet perl module which can be downloaded from this site:
http://search.cpan.org/~gbarr/libnet/
You could also download Net::SMTP separately and put it together with your script in case if you don't have admin right on this server.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12530013
nochkin.

SMTP has nothing to do with SFTP
0
 
LVL 3

Expert Comment

by:nochkin
ID: 12530414
Tintin, you are right. I was playing with Net::SMTP just few minutes before this answer.
Anyway, it's just a missing module problem which can be installed using cpan shell or downloaded and installed manually from cpan.org or any mirror.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question