“recipe for target 'pm_to_blib' failed” when installing CPAN modules (Text::CSV, Tie::RegexpHash, Log::Log4perl)

拥有回忆 提交于 2020-08-09 08:14:41

问题


New Computer
Windows 10.0.17763
ActivePerl 5.28
MinGW (downloaded July 2020)
Installing with Admin privileges

When I try to install Text::CSV (required for Text::CSV::Encoded), I get the following errors:

Writing Makefile for Text::CSV  
Writing MYMETA.yml and MYMETA.json  
ISHIGAKI/Text-CSV-2.00.tar.gz  
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK  
Running make for I/IS/ISHIGAKI/Text-CSV-2.00.tar.gz  
to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 141.  

Makefile:945: recipe for target 'pm_to_blib' failed  
dmake: *** [pm_to_blib] Error 255
ISHIGAKI/Text-CSV-2.00.tar.gz  
C:\MinGW\bin\dmake.exe -- NOT OK  

Something similar happens when I try to install Tie::RegexpHash.
As far as I can tell, the step that fails is copying files from one location to another, so I think it's a setup problem. Any help will be greatly appreciated.

HISTORY

Previous computer died, did new installation. Setup worked well in previous installation (with previous version of ActivePerl).
I tried to install CPAN modules (Text::CSV, Text::CSV::Encoded, Tie::RegexpHash) installed in the previous setup, but then I get the pm_to_blib error when I tried.
I updated CPAN, and that worked.

Full Installation Log:

C:\Windows\system32>cpan "Text::CSV"  
Loading internal logger. Log::Log4perl recommended for better logging  
Reading 'C:\Perl64\cpan\Metadata'  
  Database was generated on Tue, 21 Jul 2020 02:17:03 GMT  
Running install for module 'Text::CSV'  
CPAN: Digest::SHA loaded ok (v6.01)  
CPAN: Compress::Zlib loaded ok (v2.092)  
Checksum for C:\Perl64\cpan\sources\authors\id\I\IS\ISHIGAKI\Text-CSV-2.00.tar.gz ok  
CPAN: Archive::Tar loaded ok (v2.30)  
CPAN: YAML::XS loaded ok (v0.69)  
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)  
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)  
CPAN: CPAN::Meta loaded ok (v2.150010)  
CPAN: Module::CoreList loaded ok (v5.20181129_28)  
Configuring I/IS/ISHIGAKI/Text-CSV-2.00.tar.gz with Makefile.PL  
Welcome to Text::CSV (v.2.00)  
=============================  
You have Text::CSV_XS (v.1.34), so Text::CSV can work very fast!!  
  
Checking if your kit is complete...  
Looks good  
Generating a dmake-style Makefile  
Writing Makefile for Text::CSV  
Writing MYMETA.yml and MYMETA.json  
  ISHIGAKI/Text-CSV-2.00.tar.gz  
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK  
Running make for I/IS/ISHIGAKI/Text-CSV-2.00.tar.gz  
to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 141.  
Makefile:945: recipe for target 'pm_to_blib' failed  
dmake: *** [pm_to_blib] Error 255  
  ISHIGAKI/Text-CSV-2.00.tar.gz  
  C:\MinGW\bin\dmake.exe -- NOT OK  

回答1:


Uninstalling ActivePerl and installing Strawberry Perl indeed has done the trick.

Maybe because the latest version of ActivePerl no longer has ppm (you have to build the the CPAN modules into the Perl you download--if they have them), cpan no longer works.

Thanks again, Håkon Hægland



来源:https://stackoverflow.com/questions/63022407/recipe-for-target-pm-to-blib-failed-when-installing-cpan-modules-textcsv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!