Can‘t locate XXX/XXX.pm in @INC (you may need to install the XXX::XXX module)

  错误的日志如下,在执行tmake时,出现Can't locate Capture/Tiny.pm

 coco@nvdla:~/NVDLA/hw-master$ ./tools/bin/tmake  -build vmod
Can't locate Capture/Tiny.pm in @INC (you may need to install the Capture::Tiny module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./tools/bin/tmake line 12.
BEGIN failed--compilation aborted at ./tools/bin/tmake line 12.

解决方案:

1、前往metacpan这个网站:https://metacpan.org/pod,根据日志(XXX/XXX.pm)去搜索需要的文件,本文中为Capture/Tiny.pm

 

2、 点击左下角download

Can‘t locate XXX/XXX.pm in @INC (you may need to install the XXX::XXX module)_第1张图片

 

 3、下载完成后,开始解压 

unzip  .zip

4、进入到解压的文件夹中,依次执行以下命令

cd Capture-Tiny-0.48/

perl Makefile.PL
 
make 
 
sudo make install

问题解决!!!!!!!

coco@nvdla:~$ cd Capture-Tiny-0.48/
Changes  CONTRIBUTING.mkdn  cpanfile  dist.ini  examples  lib  LICENSE  Makefile.PL  MANIFEST  META.json  META.yml  perlcritic.rc  README  t  Todo  xt
coco@nvdla:~/Capture-Tiny-0.48$ perl Makefile.PL 
Checking if your kit is complete...
Looks good
Writing Makefile for Capture::Tiny
Writing MYMETA.yml and MYMETA.json
wade@nvdla:~/Capture-Tiny-0.48$ make 
cp lib/Capture/Tiny.pm blib/lib/Capture/Tiny.pm
Manifying blib/man3/Capture::Tiny.3pm
coco@nvdla:~/Capture-Tiny-0.48$ make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
Do not have write permissions on '/usr/local/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
make: *** [pure_site_install] Error 13
coco@nvdla:~/Capture-Tiny-0.48$ sudo make install
[sudo] password for coco: 
Installing /usr/local/share/perl/5.18.2/Capture/Tiny.pm
Installing /usr/local/man/man3/Capture::Tiny.3pm
Appending installation info to /usr/local/lib/perl/5.18.2/perllocal.pod

你可能感兴趣的:(perl,php)