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

在运行Perl脚本时遇到找不到File/Copy/Recursive.pm模块的问题,通过运行`perl -MCPAN -e install "install File::Copy::Recursive"`或`sudo cpan install File::Copy::Recursive`来安装缺失的模块。安装过程包括检查、编译、测试和安装步骤,最后成功将File::Copy::Recursive模块安装到指定路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天运行perl脚本的时候,发现一个找不到“Recursive.pm”的错误:

Can't locate File/Copy/Recursive.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.12.4/darwin-thread-multi-2level


BEGIN failed--compilation aborted at xxxx.pl line 6.


解决的方法是安装缺少的Recursive.pm,敲入下面的命令:


android:antt lee$ perl -MCPAN -e install "install File::Copy::Recursive"


或者

android:antt lee$ sudo cpan install File::Copy::Recursive

Password:

Going to read '/Users/lee/.cpan/Metadata'

  Database was generated on Tue, 23 Sep 2014 22:29:02 GMT

Running install for module 'File::Copy::Recursive'

Running make for D/DM/DMUEY/File-Copy-Recursive-0.38.tar.gz

Checksum for /Users/lee/.cpan/sources/authors/id/D/DM/DMUEY/File-Copy-Recursive-0.38.tar.gz ok


  CPAN.pm: Going to build D/DM/DMUEY/File-Copy-Recursive-0.38.tar.gz


Checking if your kit is complete...

Looks good

Writing Makefile for File::Copy::Recursive

cp Recursive.pm blib/lib/File/Copy/Recursive.pm

Manifying blib/man3/File::Copy::Recursive.3pm

  DMUEY/File-Copy-Recursive-0.38.tar.gz

  /usr/bin/make -- OK

'YAML' not installed, will not store persistent state

Running make test

PERL_DL_NONLAZY=1 /opt/local/bin/perl5.12 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

t/1.t .. ok   

All tests successful.

Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.03 cusr  0.00 csys =  0.06 CPU)

Result: PASS

  DMUEY/File-Copy-Recursive-0.38.tar.gz

  /usr/bin/make test -- OK

Running make install

Installing /opt/local/lib/perl5/site_perl/5.12.4/File/Copy/Recursive.pm

Installing /opt/local/share/perl5.12/siteman/man3/File::Copy::Recursive.3pm

Appending installation info to /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/perllocal.pod

  DMUEY/File-Copy-Recursive-0.38.tar.gz

  /usr/bin/make install  -- OK





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值