求助:安装Net::SSH::Expect出错

求助:安装Net::SSH::Expect出错

cpan> install Net::SSH::Expect
Running install for module Net::SSH::Expect
Running make for B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz
  Is already unwrapped into directory /root/.cpan/build/Net-SSH-Expect-1.09
  Has already been processed within this session
Running make test
---- Unsatisfied dependencies detected during [B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz] -----
    Expect
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make install
  make test had returned bad status, won't install without force
  Delayed until after prerequisites
Running install for module Expect
Running make for R/RG/RGIERSIG/Expect-1.21.tar.gz
  Is already unwrapped into directory /root/.cpan/build/Expect-1.21
  Has already been processed within this session
Running make test
---- Unsatisfied dependencies detected during [R/RG/RGIERSIG/Expect-1.21.tar.gz] -----
    IO:ty
    IO::Tty
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make install
  make test had returned bad status, won't install without force
  Delayed until after prerequisites
Running install for module IO:ty
Running make for R/RG/RGIERSIG/IO-Tty-1.07.tar.gz
  Is already unwrapped into directory /root/.cpan/build/IO-Tty-1.07
  Makefile.PL returned status 6400
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install
Running install for module IO::Tty
Running make for R/RG/RGIERSIG/IO-Tty-1.07.tar.gz
  Is already unwrapped into directory /root/.cpan/build/IO-Tty-1.07
  Makefile.PL returned status 6400
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install
Running make for R/RG/RGIERSIG/Expect-1.21.tar.gz
  Is already unwrapped into directory /root/.cpan/build/Expect-1.21
  Has already been processed within this session
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..42
Can't locate IO/Pty.pm in @INC (@INC contains: blib/lib 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 blib/lib/Expect.pm line 22.
BEGIN failed--compilation aborted at blib/lib/Expect.pm line 22.
Compilation failed in require at test.pl line 27.
BEGIN failed--compilation aborted at test.pl line 27.
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
Running make for B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz
  Is already unwrapped into directory /root/.cpan/build/Net-SSH-Expect-1.09
  Has already been processed within this session
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Net-SSH-Expect....1/1
#   Failed test 'use Net::SSH::Expect;'
#   at t/Net-SSH-Expect.t line 9.
#     Tried to use 'Net::SSH::Expect'.
#     Error:  Can't locate Expect.pm in @INC (@INC contains: /root/.cpan/build/Net-SSH-Expect-1.09/blib/lib /root/.cpan/build/Net-SSH-Expect-1.09/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 /root/.cpan/build/Net-SSH-Expect-1.09/blib/lib/Net/SSH/Expect.pm line 10.
# BEGIN failed--compilation aborted at /root/.cpan/build/Net-SSH-Expect-1.09/blib/lib/Net/SSH/Expect.pm line 10.
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
# Looks like you failed 1 test of 1.
t/Net-SSH-Expect.... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/Net-SSH-Expect (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.00 usr  0.04 sys +  0.00 cusr  0.04 csys =  0.08 CPU)
Result: FAIL
Failed 1/1 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 1
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force
                                                                                                                                                                                 cpan>


QUOTE:
原帖由 adminsinx 于 2008-12-23 18:33 发表
Can't locate IO/Pty.pm in @INC

不清楚什么原因。关注一下。


QUOTE:
原帖由 ynchnluiti 于 2008-12-23 19:12 发表

不清楚什么原因。关注一下。

这不就是找不到 IO::Pty 么
cpan自己装的自己找不到啊


QUOTE:
原帖由 ynchnluiti 于 2008-12-23 21:00 发表
cpan自己装的自己找不到啊

这有什么好新奇的。
只是觉得有点。。它自己都不知道装在哪里了。
应该如何解决呢?


QUOTE:
原帖由 adminsinx 于 2008-12-24 09:54 发表
应该如何解决呢?

试着重新安装 Net::SSH::Expect

如果还说找不到 IO::Pty, 而你又确认 IO::Pty 在你的系统上安装了(最保险的办法是搜索 IO/Pty.pm),那就看看它安装的路径在不在 @INC 中,不在的话就添加上去。
文件xx
#!/usr/bin/perl -w
my $dir='/root/.cpan/build/';
unshift @INC, $dir;
use Net::SSH::Expect;

执行 perl xx
结果:
Can't locate Net/SSH/Expect.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 xx line 4.
BEGIN failed--compilation aborted at xx line 4.

ls /root/.cpan/build/
Archive-Tar-1.40         IO-Compress-Base-2.015  Scalar-List-Utils-1.19
Archive-Zip-1.26         IO-Compress-Zlib-2.015  TermReadKey-2.30
Compress-Raw-Zlib-2.015  IO-Tty-1.07             Term-ReadLine-Perl-1.0302
Compress-Zlib-2.015      IO-Zlib-1.09            Test-Simple-0.86
Digest-SHA-5.47          libnet-1.22             Text-Glob-0.08
Expect-1.21              Module-Build-0.30       YAML-0.66
File-HomeDir-0.82        Net-SSH-Expect-1.09
File-Temp-0.21           PathTools-3.29


QUOTE:
原帖由 adminsinx 于 2008-12-24 11:57 发表
文件xx
#!/usr/bin/perl -w
my $dir='/root/.cpan/build/';
unshift @INC, $dir;
use Net::SSH::Expect;

执行 perl xx
结果:
Can't locate Net/SSH/Expect.pm in @INC (@INC contains: /etc/perl /us ...

能直接用这里的吗?