从 CPAN 安装模块时无法识别 dmake 命令 [英] dmake is not recognized command when installing module from CPAN

查看:100
本文介绍了从 CPAN 安装模块时无法识别 dmake 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 Active Perl 从 CPAN 安装 Win32::API 时,安装不成功.问题源于以下错误:

When trying to install Win32::API from CPAN using Active Perl, the installation isn't successful. The problems stem from the following error:

'dmake' is not recognized as an internal or external command,

我该如何解决这个问题?

How can I resolve this problem?

cpan Win32::API的完整输出:

Loading internal logger. Log::Log4perl recommended for better logging
Reading 'C:\Perl64\cpan\Metadata'
  Database was generated on Sat, 21 Mar 2020 04:17:03 GMT
CPAN: LWP::UserAgent loaded ok (v6.31)
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.69)
Reading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.092)
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
  Database was generated on Sun, 22 Mar 2020 05:41:03 GMT
.............
  New CPAN.pm version (v2.27) available.
  [Currently running version is v2.20]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


...............................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Reading 'C:\Perl64\cpan\sources\modules\03modlist.data.gz'
DONE
Writing C:\Perl64\cpan\Metadata
Running install for module 'Win32::API'
CPAN: Digest::SHA loaded ok (v6.01)
Checksum for C:\Perl64\cpan\sources\authors\id\B\BU\BULKDD\Win32\Win32-API-0.84.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
Win32-API-0.84/
....
Win32-API-0.84/Type.pm
Win32-API-0.84/TYPEMAP
Win32-API-0.84/typemap56
Win32-API-0.84/W32ATest.pm
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 B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Encode::compat 0 not found.
Warning: prerequisite Math::Int64 0 not found.
Writing MYMETA.yml and MYMETA.json
Generating a dmake-style Makefile
Writing Makefile for Win32::API
Writing MYMETA.yml and MYMETA.json
  BULKDD/Win32/Win32-API-0.84.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
---- Unsatisfied dependencies detected during ----
----    BULKDD/Win32/Win32-API-0.84.tar.gz    ----
    Encode::compat [build_requires]
    Math::Int64 [build_requires]
Running install for module 'Encode::compat'
Checksum for C:\Perl64\cpan\sources\authors\id\A\AU\AUTRIJUS\Encode-compat-0.07.tar.gz ok
....
Encode-compat-0.07/META.yml
Encode-compat-0.07/Changes
Encode-compat-0.07/t/
Encode-compat-0.07/t/1-basic.t
Encode-compat-0.07/t/0-signature.t
Encode-compat-0.07/MANIFEST
Encode-compat-0.07/SIGNATURE
Encode-compat-0.07/Makefile.PL
Encode-compat-0.07/README
Configuring A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Encode::compat
Writing MYMETA.yml and MYMETA.json
  AUTRIJUS/Encode-compat-0.07.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz
'dmake' is not recognized as an internal or external command,
operable program or batch file.
  AUTRIJUS/Encode-compat-0.07.tar.gz
  dmake -- NOT OK
Running install for module 'Math::Int64'
Checksum for C:\Perl64\cpan\sources\authors\id\S\SA\SALVA\Math-Int64-0.54.tar.gz ok
Math-Int64-0.54/
Math-Int64-0.54/COPYING
Math-Int64-0.54/Changes
.....
Configuring S/SA/SALVA/Math-Int64-0.54.tar.gz with Makefile.PL
Using IV backend
fileparse(): need a valid pathname at C:/Perl64/site/lib/ExtUtils/CBuilder/Base.pm line 50.
Checking for stdlib.h... Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
  SALVA/Math-Int64-0.54.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
  BULKDD/Win32/Win32-API-0.84.tar.gz
  Has already been unwrapped into directory C:\Perl64\cpan\build\Win32-API-0.84-2
  BULKDD/Win32/Win32-API-0.84.tar.gz
  Has already been prepared
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
Warning: Prerequisite 'Encode::compat => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'AUTRIJUS/Encode-compat-0.07.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Math::Int64 => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'SALVA/Math-Int64-0.54.tar.gz' with 'writemakefile => NO 'C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 6400'. Continuing, but chances to succeed are limited.
'dmake' is not recognized as an internal or external command,
operable program or batch file.
  BULKDD/Win32/Win32-API-0.84.tar.gz
  dmake -- NOT OK

推荐答案

我有 ActivePerl 并且能够安装(一些)模块.我正在使用 MinGW,我所要做的就是复制它的 make 并重命名副本 dmake.exe.对我来说就是这样.

I have ActivePerl and was able to install (some) modules. I am using MinGW, and all I had to do is to copy it's make and rename the copy dmake.exe. That did it for me.

或者,有一种方法可以告诉 CPAN 使用哪个 make:在 cpan 中,使用命令

Alternatively, there is a way to tell CPAN which make to use: in cpan, use the command

cpan> o conf make <your make path and executable>

我从这篇文章得到了这个答案.我确实遇到了 与其他模块不同的问题.

I got this answer from this post. I did encounter a different problem with other modules.

这篇关于从 CPAN 安装模块时无法识别 dmake 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆