Hi,
I'm using Ubuntu 7.04.
I'm writing a sript that sends files via ftp for several destinations.
So far I used Net::FTP and it worked fine.
My problem is that I need to send files via SFTP (SSH2). I've been trying to install Net::SFTP with 'sudo perl -MCPAN -e "install NET::SFTP' but I can't. It stops in the middle of the installation: - Crypt-DH-0.06/t/
-
Crypt-DH-0.06/t/00-compile.t
-
Crypt-DH-0.06/t/01-dh.t
-
Crypt-DH-0.06/ToDo
-
Removing previously used /home/joao/.cpan/build/Crypt-DH-0.06
-
-
CPAN.pm: Going to build B/BT/BTROTT/Crypt-DH-0.06.tar.gz
-
-
*** ExtUtils::AutoInstall version 0.56
-
*** Checking for dependencies...
-
[Core Features]
-
- Math::BigInt ...loaded. (1.77 >= 1.60)
-
*** ExtUtils::AutoInstall configuration finished.
-
Checking if your kit is complete...
-
Looks good
-
Writing Makefile for Crypt::DH
-
cp lib/Crypt/DH.pm blib/lib/Crypt/DH.pm
-
Manifying blib/man3/Crypt::DH.3pm
-
/usr/bin/make -- OK
-
Running make test
-
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-compile.t t/01-dh.t
-
t/00-compile....ok
-
t/01-dh.........ok 15/18
If I use CTRL-C it finishes but with errors and I can't use the module in my scripts.
Can someone help me to install this, or another module that can SFTP or some other way to get my goal?
Thanks in advance for any help,
João
12 15345
What errors are you getting?
The problem is installing the dependency Net::SSH::Perl.
I tried to install it separately and got the same error!
the installation stops in this "15/18".
If I leave it "die" for it self, the result is the same.
this is the output til the end:
I have cut some of the output because was too big for one post - t/01-dh.........ok 15/18make: *** wait: No child processes. Stop.
-
make: *** Waiting for unfinished jobs....
-
make: *** wait: No child processes. Stop.
-
/usr/bin/make test -- NOT OK
-
Running make install
-
make test had returned bad status, won't install without force
-
Running install for module Math::GMP
-
Running make for C/CH/CHIPT/Math-GMP-2.04.tar.gz
-
Checksum for /home/joao/.cpan/sources/authors/id/C/CH/CHIPT/Math-GMP-2.04.tar.gz ok
-
Math-GMP-2.04/
-
Math-GMP-2.04/Changes
-
Math-GMP-2.04/COPYING.LIB
-
Math-GMP-2.04/MANIFEST
-
Math-GMP-2.04/typemap
-
Math-GMP-2.04/GMP.xs
-
Math-GMP-2.04/t/
-
Math-GMP-2.04/t/gmppm.t
-
Math-GMP-2.04/lib/
-
Math-GMP-2.04/lib/Math/
-
Math-GMP-2.04/lib/Math/GMP.pm
-
Math-GMP-2.04/INSTALL
-
Math-GMP-2.04/Makefile.PL
-
Math-GMP-2.04/README
-
Math-GMP-2.04/LICENSE
-
Removing previously used /home/joao/.cpan/build/Math-GMP-2.04
-
-
CPAN.pm: Going to build C/CH/CHIPT/Math-GMP-2.04.tar.gz
-
-
Checking if your kit is complete...
-
Looks good
-
Note (probably harmless): No library found for -lgmp
-
Writing Makefile for Math::GMP
-
cp lib/Math/GMP.pm blib/lib/Math/GMP.pm
-
AutoSplitting blib/lib/Math/GMP.pm (blib/lib/auto/Math/GMP)
-
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
-
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.04\" -DXS_VERSION=\"2.04\" -fPIC "-I/usr/lib/perl/5.8/CORE" GMP.c
-
GMP.xs:4:17: error: gmp.h: No such file or directory
-
GMP.c: In function ‘XS_Math__GMP_new_from_scalar’:
-
GMP.c:93: error: ‘mpz_t’ undeclared (first use in this function)
-
GMP.c:93: error: (Each undeclared identifier is reported only once
-
GMP.c:93: error: for each function it appears in.)
-
GMP.c:93: error: ‘RETVAL’ undeclared (first use in this function)
-
GMP.c: In function ‘XS_Math__GMP_new_from_scalar_with_base’:
-
.
-
.
-
.
-
GMP.c: In function ‘XS_Math__GMP_gmp_fac’:
-
GMP.c:1024: error: ‘mpz_t’ undeclared (first use in this function)
-
GMP.c:1024: error: ‘RETVAL’ undeclared (first use in this function)
-
GMP.c: In function ‘XS_Math__GMP_gmp_copy’:
-
GMP.c:1044: error: ‘mpz_t’ undeclared (first use in this function)
-
GMP.c:1044: error: ‘m’ undeclared (first use in this function)
-
GMP.c:1045: error: ‘RETVAL’ undeclared (first use in this function)
-
GMP.c:1103: error: expected expression before ‘)’ token
-
make: *** [GMP.o] Error 1
-
/usr/bin/make -- NOT OK
-
Running make test
-
Can't test without successful make
-
Running make install
-
make had returned bad status, install seems impossible
-
Running make for D/DB/DBROBINS/Net-SSH-Perl-1.30.tar.gz
-
Is already unwrapped into directory /home/joao/.cpan/build/Net-SSH-Perl-1.30
-
-
CPAN.pm: Going to build D/DB/DBROBINS/Net-SSH-Perl-1.30.tar.gz
-
-
cp lib/Net/SSH/Perl/Agent.pm blib/lib/Net/SSH/Perl/Agent.pm
-
cp lib/Net/SSH/Perl/Auth/KeyboardInt.pm
-
.
-
.
-
.
-
Manifying blib/man3/Net::SSH::Perl::Key::RSA.3pm
-
Manifying blib/man3/Net::SSH::Perl::Packet.3pm
-
/usr/bin/make -- OK
-
Running make test
-
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
-
t/01-compile.....ok
-
t/02-buffer......Can't locate Math/GMP.pm in @INC (@INC contains: /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at t/02-buffer.t line 9.
-
BEGIN failed--compilation aborted at t/02-buffer.t line 9.
-
# Looks like your test died before it could output anything.
-
t/02-buffer......dubious
-
Test returned status 255 (wstat 65280, 0xff00)
-
DIED. FAILED tests 1-19
-
Failed 19/19 tests, 0.00% okay
-
t/03-packet......Can't locate Math/GMP.pm in @INC (@INC contains: /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/Util.pm line 56.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/Key/RSA1.pm line 6.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/SSH1.pm line 13.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl/SSH1.pm line 13.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SSH-Perl-1.30/blib/lib/Net/SSH/Perl.pm line 54.
-
# Looks like your test died before it could output anything.
-
t/03-packet......dubious
-
Test returned status 255 (wstat 65280, 0xff00)
-
DIED. FAILED tests 1-10
-
Failed 10/10 tests, 0.00% okay
-
t/04-config......ok
-
t/05-cipher......ok
-
t/06-circular....ok
-
Failed Test Stat Wstat Total Fail Failed List of Failed
-
-------------------------------------------------------------------------------
-
t/02-buffer.t 255 65280 19 38 200.00% 1-19
-
t/03-packet.t 255 65280 10 20 200.00% 1-10
-
Failed 2/6 test scripts, 66.67% okay. 29/116 subtests failed, 75.00% okay.
-
make: *** [test_dynamic] Error 255
-
/usr/bin/make test -- NOT OK
-
Running make install
-
make test had returned bad status, won't install without force
-
Running make for D/DB/DBROBINS/Net-SFTP-0.10.tar.gz
-
Is already unwrapped into directory /home/joao/.cpan/build/Net-SFTP-0.10
-
-
CPAN.pm: Going to build D/DB/DBROBINS/Net-SFTP-0.10.tar.gz
-
-
cp lib/Net/SFTP/Util.pm blib/lib/Net/SFTP/Util.pm
-
cp lib/Net/SFTP.pm blib/lib/Net/SFTP.pm
-
cp lib/Net/SFTP/Attributes.pm blib/lib/Net/SFTP/Attributes.pm
-
cp lib/Net/SFTP/Buffer.pm blib/lib/Net/SFTP/Buffer.pm
-
cp lib/Net/SFTP/Constants.pm blib/lib/Net/SFTP/Constants.pm
-
Manifying blib/man3/Net::SFTP::Util.3pm
-
Manifying blib/man3/Net::SFTP.3pm
-
Manifying blib/man3/Net::SFTP::Attributes.3pm
-
Manifying blib/man3/Net::SFTP::Buffer.3pm
-
Manifying blib/man3/Net::SFTP::Constants.3pm
-
/usr/bin/make -- OK
-
Running make test
-
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
-
t/01-load........Can't locate Net/SSH/Perl/Buffer.pm in @INC (@INC contains: /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib /home/joao/.cpan/build/Net-SFTP-0.10/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Buffer.pm line 6.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Buffer.pm line 6.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Attributes.pm line 7.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Attributes.pm line 7.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP.pm line 8.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP.pm line 8.
-
Compilation failed in require at t/01-load.t line 5.
-
BEGIN failed--compilation aborted at t/01-load.t line 5.
-
t/01-load........dubious
-
Test returned status 2 (wstat 512, 0x200)
-
DIED. FAILED test 1
-
Failed 1/1 tests, 0.00% okay
-
t/06-circular....Can't locate Net/SSH/Perl/Buffer.pm in @INC (@INC contains: /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib /home/joao/.cpan/build/Net-SFTP-0.10/blib/arch /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Buffer.pm line 6.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Buffer.pm line 6.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Attributes.pm line 7.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP/Attributes.pm line 7.
-
Compilation failed in require at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP.pm line 8.
-
BEGIN failed--compilation aborted at /home/joao/.cpan/build/Net-SFTP-0.10/blib/lib/Net/SFTP.pm line 8.
-
Compilation failed in require at t/06-circular.t line 5.
-
BEGIN failed--compilation aborted at t/06-circular.t line 5.
-
t/06-circular....dubious
-
Test returned status 2 (wstat 512, 0x200)
-
Failed Test Stat Wstat Total Fail Failed List of Failed
-
-------------------------------------------------------------------------------
-
t/01-load.t 2 512 1 2 200.00% 1
-
t/06-circular.t 2 512 ?? ?? % ??
-
Failed 2/2 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
-
make: *** [test_dynamic] Error 2
-
/usr/bin/make test -- NOT OK
-
Running make install
-
make test had returned bad status, won't install without force
-
joao@joao-desktop:/usr/local/share/perl/5.8.8$
-
Because you have SOOO much text in your post, you are going to have to break it up over a couple of replies in order for it to display. Please do this if you can.
Regards,
Jeff
Now I've tried to install the modules "manually".
I extracted the modules Net::SSH::PERL and NET::SFTP
then:
perl Makefile.PL
make
make test
make install
the make test give some erros in the both of them, but the make install runs fine.
when I run my script still have this error: -
joao@joao-UBUNTU:~/files$ perl netftp
-
Can't locate Math/Pari.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 6.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 6.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util.pm line 56.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP/Buffer.pm line 9.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SFTP/Attributes.pm line 7.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP/Attributes.pm line 7.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 8.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 8.
-
Compilation failed in require at netftp line 5.
-
BEGIN failed--compilation aborted at netftp line 5.
-
joao@joao-UBUNTU:~/files$
please, help me!!
Now I've tried to install the modules "manually".
I extracted the modules Net::SSH::PERL and NET::SFTP
then:
perl Makefile.PL
make
make test
make install
the make test give some erros in the both of them, but the make install runs fine.
when I run my script still have this error: -
joao@joao-UBUNTU:~/files$ perl netftp
-
Can't locate Math/Pari.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 6.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 6.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SSH/Perl/Util.pm line 56.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP/Buffer.pm line 9.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SFTP/Attributes.pm line 7.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP/Attributes.pm line 7.
-
Compilation failed in require at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 8.
-
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 8.
-
Compilation failed in require at netftp line 5.
-
BEGIN failed--compilation aborted at netftp line 5.
-
joao@joao-UBUNTU:~/files$
please, help me!!
From this error:
Can't locate Math/Pari.pm in @INC
It looks like you are missing that module.
Regards,
Jeff
Thansk jeff, I guess was really that the problem.
I Installed it, after that the Net::SSH::perl, and after that my Net::SFTP
Now it compiles without error the use of the module:
use Net::SFTP;
in my script.
But when I try to really use SFTP with this code: - #!/usr/bin/perl
-
-
use Net::SFTP;
-
-
my $host = 'sftp.tvnet.com.pt';
-
my $user = 'estreias';
-
my $pwd = 'cinema';
-
-
print "breakpoint1\n";
-
-
-
my $sftp = Net::SFTP->new($host);
-
-
-
print "breakpoint2\n";
-
-
-
$sftp->put("sudo /home/joao/Desktop/AllCode.odt", AllCode.odt);
-
-
$sftp->quit;
-
-
I get this error:
Permission denied at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 62
The problem is that this is not in my code but in the files of the installation!
The error comes after breakpoint 1;
Can someone give me some light here?
thanks a lot,
João
Thansk jeff, I guess was really that the problem.
I Installed it, after that the Net::SSH::perl, and after that my Net::SFTP
Now it compiles without error the use of the module:
use Net::SFTP;
in my script.
But when I try to really use SFTP with this code: - #!/usr/bin/perl
-
-
use Net::SFTP;
-
-
my $host = 'sftp.tvnet.com.pt';
-
my $user = 'estreias';
-
my $pwd = 'cinema';
-
-
print "breakpoint1\n";
-
-
-
my $sftp = Net::SFTP->new($host);
-
-
-
print "breakpoint2\n";
-
-
-
$sftp->put("sudo /home/joao/Desktop/AllCode.odt", AllCode.odt);
-
-
$sftp->quit;
-
-
I get this error:
Permission denied at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 62
The problem is that this is not in my code but in the files of the installation!
The error comes after breakpoint 1;
Can someone give me some light here?
thanks a lot,
João
Just out of curiosity, when you installed the modules, did you do it as root or did you use "sudo"?
If you did it as root, then that could be your problem. Doing it as sudo runs the commands for installation with root permissions, but the difference is, you can still access the information.
Regards,
Jeff
I had run it with sudo.
I'm not sure if is a problem in the installation or if I need to pass some more args in my code...
Right now I can't test this sftp with any server.,,
I had run it with sudo.
I'm not sure if is a problem in the installation or if I need to pass some more args in my code...
Right now I can't test this sftp with any server.,,
Since the process is SFTP, it leads me to ask if there is a login and pwd associated with the login to the remote server. If so, are they specified correctly? Just throwing out ideas is all.
Regards,
Jeff
I use to use Filezilla to send files and I'm trying to use the same user, pwd, etc. I want to make a script to automate this process.
Do you think I can use SFTP in a regular FTP server? I'm not sure if the difference is only in "the way you send it" or is something else.
If I could, I could test my Net::SFTP.
thanks for your help,
João
try using Net::SFTP::Foreign or Net::SSH2 instead
thansk for your help guys, I already made it work.
I had to install every modules needed mannually!
hugs,
João
Post your reply Sign in to post your reply or Sign up for a free account.
Similar topics
3 posts
views
Thread by Peter A. Schott |
last post: by
|
3 posts
views
Thread by Gus M. Creces |
last post: by
|
reply
views
Thread by Bernhard Günther |
last post: by
|
3 posts
views
Thread by Lad |
last post: by
| |
6 posts
views
Thread by =?Utf-8?B?UHVjY2E=?= |
last post: by
| |
reply
views
Thread by arkascha |
last post: by
|
4 posts
views
Thread by sa6113 |
last post: by
| | | | | | | | | | |