“目标'pm_to_blib'的配方失败”安装CPAN模块时(Text :: CSV,Tie :: RegexpHash,Log :: Log4perl) [英] "recipe for target 'pm_to_blib' failed" when installing CPAN modules (Text::CSV, Tie::RegexpHash, Log::Log4perl)
问题描述
新计算机
Windows 10.0.17763
ActivePerl 5.28
MinGW(2020年7月下载)
安装具有管理员权限
New Computer
Windows 10.0.17763
ActivePerl 5.28
MinGW (downloaded July 2020)
Installing with Admin privileges
当我尝试安装Text :: CSV(对于Text :: CSV :: Encoded必需)时,出现以下错误:
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
当我尝试安装Tie :: RegexpHash时也会发生类似的事情。
据我所知,失败的步骤是将文件从一个位置复制到另一个,所以我认为这是一个设置专家lem
任何帮助将不胜感激。
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.
以前的计算机死了,做了新的安装。安装程序在以前的安装(使用ActivePerl的先前版本)中运行良好。
我试图安装CPAN模块(Text :: CSV,Text :: CSV :: Encoded,Tie :: RegexpHash)。以前的设置,但尝试时出现 pm_to_blib 错误。
我更新了CPAN,并且有效。
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.
完整安装日志:
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
推荐答案
卸载ActivePerl并
Uninstalling ActivePerl and installing Strawberry Perl indeed has done the trick.
也许是因为最新版本的ActivePerl不再具有ppm(您必须将CPAN模块构建到您下载的Perl中,如果它们具有
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.
再次感谢,HåkonHægland
Thanks again, Håkon Hægland
这篇关于“目标'pm_to_blib'的配方失败”安装CPAN模块时(Text :: CSV,Tie :: RegexpHash,Log :: Log4perl)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!