Perl脚本 - 无法在@INC中找到Net / SSH / Perl.pm

时间:2012-03-27 15:27:44

标签: perl

我正在尝试运行Perl脚本,该脚本只是从一个Windows 2003 x64复制到另一个相同类型的Windows机器。

我安装了ActivePerl,收到以下错误:

F:\Supportsaves\Scripts\Supportsave_Script>Can't locate Net/SSH/Perl.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at F:\Supportsaves\Scripts\switches_supportsave.pl line 11.
BEGIN failed--compilation aborted at F:\Supportsaves\Scripts\switches_supportsave.pl line 11.

我已经搜索过,可能Net::SSH::Perl丢失,但我没有安装它(在设置代理后)我得到了

F:\Supportsaves\Scripts\Supportsave_Script>ppm install Net-SSH-Perl
ppm install failed: Can't find any package that provides Net-SSH-Perl

使用ppm时,我无法在GUI中找到此模块。

CPAN会产生其他错误。

感谢任何帮助。


 Result after installing Net::SSH::Perl in Strawberry, CPAN   Test Summary Report
-------------------
t/03-packet.t    (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan.  You planned 10 tests but ran 0.
Files=12, Tests=106,  2 wallclock secs ( 0.09 usr +  0.03 sys =  0.12 CPU)
Result: FAIL`

Failed 1/12 test programs. 0/106 subtests failed.
dmake.EXE:  Error code 255, while making 'test_dynamic'
TURNSTEP/Net-SSH-Perl-1.34.tar.gz
2 dependencies missing (Math::Pari,Crypt::RSA); additionally test harness failed`

C:\Perl\strawberry\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports TURNSTEP/Net-SSH-Perl-1.34.tar.gz
Running make install
make test had returned bad status, won't install without force`

`F:\Supportsaves\Scripts\Supportsave_Script>`

-----------------

Installing in Active Perl with CPAN Net::SSH::Perl does partly work well, there are   
missing dependencies, which can't be installed either...

Result: PASS
TURNSTEP/Net-SSH-Perl-1.34.tar.gz
Tests succeeded but 7 dependencies missin  
(Crypt::IDEA,Math::Pari,Crypt::DSA,Convert::PEM,String::CRC32,Math::GMP,Crypt 
::RSA)
TURNSTEP/Net-SSH-Perl-1.34.tar.gz
[dependencies] -- NA
Running make install
make test had returned bad status, won't install without force`

`F:\Supportsaves\Scripts\Supportsave_Script>`

 Crypt::IDEA fails ...
 C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32  
 \bin\ld.exe: cannot find -lbufferoverflowU
 collect2: ld returned 1 exit status
 dmake.exe:  Error code 129, while making 'blib\arch\auto\Crypt\IDEA\IDEA.dll'
 DPARIS/Crypt-IDEA-1.08.tar.gz
 C:\Perl\site\bin\dmake.exe -- NOT OK
 CPAN: YAML::XS loaded ok (v0.35)
 Running make test
 Can't test without successful make
 Running make install
 Make had returned bad status, install seems impossible `

2 个答案:

答案 0 :(得分:4)

据我所知,Net::SSH::Perl模块仅位于 Bribes ppm存储库中

http://www.bribes.org/perl/ppm/

如果将其添加到ppm的存储库列表中,则应正确安装。

答案 1 :(得分:4)

试试这个,这可能有效:

ppm install http://theoryx5.uwinnipeg.ca/ppms/Net-SSH2.ppd
ppm install http://theoryx5.uwinnipeg.ca/ppms/Net-SSH-Perl.ppd

的问候,