Operating System - HP-UX
1821537 Members
2582 Online
109633 Solutions
New Discussion юеВ

Install Net::SFTP perl module

 
Brian Lee_4
Regular Advisor

Install Net::SFTP perl module

When I try to install "Net::SFTP" perl module,
I get the following message.

#perl -MCPAN -e 'shell'

Can't locate CPAN.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.0050
2 /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 /opt/perl5/lib/site_perl/5.005 .).
BEGIN failed--compilation aborted.

Please help me resolve this problem.
brian lee
4 REPLIES 4
Mel Burslan
Honored Contributor

Re: Install Net::SFTP perl module

Obviously, it can not find the CPAN.pm

run this command to see where this file is located

find /opt -name "CPAN.pm"

after finding it, either copy the file to where it is looking for or create a symlink (I am not sure about how perl treats symlinks, so copying it to where it is needed is a better approach in my opinion)

HTH
________________________________
UNIX because I majored in cryptology...
Pat Lieberg
Valued Contributor

Re: Install Net::SFTP perl module

It looks like you are running perl 5.005, which is quite old. You might think about upgrading. Its possible the module you are trying to install requires a more recent version of perl. Its also possible you have more than one version of perl installed, but the path is finding this old version rather than the more recent one.

Check perl version: perl -v

Check where perl is being run from: which perl
H.Merijn Brand (procura
Honored Contributor

Re: Install Net::SFTP perl module

You don't need the CPAN module to install modules

# cd /tmp
# wget http://search.cpan.org/CPAN/authors/id/D/DB/DBROBINS/Net-SFTP-0.09.tar.gz
# gzip -d # cd Net-SFTP-0.09
# perl Makefile.PL
# make
# make test
# make install

But I'm affraid that Net-SFTP requires some other modules to work. The Makefile.PL for example has stated Net::SSH::Perl version 1.24 to be a prerequisite, so that has to be installed first

http://search.cpan.org/CPAN/authors/id/D/DB/DBROBINS/Net-SSH-Perl-1.28.tar.gz

And that module has quite a list of prerequisites (some optional):

my %prereq = (
'Digest::MD5' => 0,
'IO::Socket' => 0,
);

my %SSH_PREREQ = (
1 => {
'String::CRC32' => '1.2',
'Math::GMP' => '1.04',
'Scalar::Util' => 0,
},

2 => {
'Digest::SHA1' => 0,
'Digest::HMAC_MD5' => 0,
'Digest::HMAC_SHA1' => 0,
'Crypt::DSA' => '0.11',
'Crypt::DH' => '0.01',
'Math::Pari' => '2.001804',
'MIME::Base64' => 0,
'Convert::PEM' => '0.05',
},

But you will understand that getting this to work with a perl as old as the one you are working with is quite a challenge :)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Gopi Sekar
Honored Contributor

Re: Install Net::SFTP perl module


you are having just too old perl5 (I remember using it 5 yrs back). So better upgrade it to latest perl (5.8), it will have CPAN module through which you can install Net::SFTP module.

believe me installing Net::SFTP module without using CPAN module is very difficult, because it requires so many dependencies which inturn require so many dependencies. The problem gets multiplied with your old perl version.

Regards,
Gopi
Never Never Never Giveup