无法在@INC 中找到 File/Remote.pm(@INC 包含:

Can't locate File/Remote.pm in @INC (@INC contains:

我遇到以下问题。

Can't locate File/Remote.pm in @INC (@INC contains: /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8/CPANPLUS/Shell/Default/Plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)

如果我列出流动的文件实际上就在那里:

 ls /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8/CPANPLUS/Shell/Default/Plugins
Diff.pm  HOWTO.pod  Remote.pm  RT.pm  Source.pm

我真的被困在这里了,这个脚本在 Solaris 上 运行ning,为了减少许可证,我已经将 100 多个站点转换为 centos,这个脚本是 运行 所必需的有几个,但我不能单独使用 google 来完成这一步。

Remote.pm 存在,但 File/Remote.pm 不存在。

它不是正确的文件,或者您需要创建 File 目录并将其移入其中。

ikegami 的评论,看起来是正确的,使它成为前者。是错误的Remote.pm。

您需要安装 the correct module properly (e.g. with cpan minus).

该文件用于 CPANPLUS::Shell::Default::Plugins::Remote[1].


@INC 包含

  • /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8/CPANPLUS/Shell/Default/Plugins
  • /usr/local/lib64/perl5
  • /usr/local/share/perl5
  • /usr/lib64/perl5/vendor_perl
  • /usr/share/perl5/vendor_perl
  • /usr/lib64/perl5
  • /usr/share/perl5
  • .

所以 Perl 检查

  • /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8/CPANPLUS/Shell/Default/Plugins/File/Remote.pm
  • /usr/local/lib64/perl5/File/Remote.pm
  • /usr/local/share/perl5/File/Remote.pm
  • /usr/lib64/perl5/vendor_perl/File/Remote.pm
  • /usr/share/perl5/vendor_perl/File/Remote.pm
  • /usr/lib64/perl5/File/Remote.pm
  • /usr/share/perl5/File/Remote.pm
  • ./File/Remote.pm

模块没有安装(或者安装在 Perl 没有被告知要查看的目录中)。只需安装模块(使用 cpan File::Remote)。


  1. 这会带来第二个问题:use CPANPLUS::Shell::Default::Plugins::Remote; 不会工作,因为

    /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8
    

    应该添加到 @INC 而不是

    /pkg/qct/software/perl/q4_06/.lib/site_perl/5.8.8/CPANPLUS/Shell/Default/Plugins
    

# cpan
> cpan install File::Remote

http://search.cpan.org/~nwiger/File-Remote-1.17/Remote.pm