我正在尝试在 Windows 7 上安装 CPAN 模块。我没有 Active Perl,因此无法使用 PPM 包。
所有站点上给出的步骤都包括这三个步骤:make、make test 和 make install。我知道 make 是 unix 命令,不会在 Windows 上运行。
我应该在 Windows 上运行什么命令来完成安装?
如其中一个站点所述,我从 CPAN 站点下载了 dmake,但是当我运行它时,它会出现以下错误-
D:\Parse-RecDescent-1.965001.tar\Parse-RecDescent-1.965001>D:\dmake\dmake\dmake dmake: 错误: -- `D:\indigoampp\perl-5.12.1\libConfig.pm' not found,并且不能制造
请让我知道如何完成这些步骤。谢谢!
PS:同样,PPM 不是一个选项。
感谢大家。
在 indigoampp\perl-5.12.1\lib 位置有一个名为 Config_heavy.pl 的文件。它有一行:make='nmake'。当我使用 dmake 命令时,我将其更改为 make='dmake' 。
在此之后,我不需要在每个模块的 Makefile 中更改 DIRFILESEP。它现在正在生成 \\ 如上述链接中所述。
所以我现在可以运行 dmake、dmake test 和 dmake install。然而它什么也没做。它没有在各个位置复制 pm 文件/文件。为什么这样??
无论如何,我手动复制了 pm 文件/文件,希望一切正常。但是,我以前也可以这样做。为什么我运行 makefile.pl 和 dmake 命令?
另外,我的目标是安装 Apache2::Request 模块。我发现它依赖于多个模块。我下载了这些模块并为它们运行了上面的命令 - 没有错误。最后,当我为 Apache2::Request 模块运行这些步骤时,我在 dmake 命令中收到以下错误:
D:\libapreq2-2.12.tar\libapreq2-2.12>dmake
dmake: makefile: line 25: Warning: -- Duplicate target [Release]
dmake: makefile: line 25: Warning: -- Duplicate target [Release]
dmake: makefile: line 25: Warning: -- Duplicate target [!=]
dmake: makefile: line 25: Error: -- Expecting macro or rule defn, found neith
er
我在 libapreq2-2.12.tar\libapreq2-2.12 文件夹下的 Makefile 中没有发现任何可疑内容。Makefile 的部分内容(在错误行周围)是:
LIBAPREQ=libapreq2
APREQ2_TEST=apreq2_test
CGITEST=test_cgi
MOD=mod_apreq2
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE CFG="Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(APACHE)" == ""
!MESSAGE No Apache directory was specified.
!MESSAGE Please run Configure.bat to specify a valid Apache directory.
!ERROR
!ENDIF
任何人都可以帮助解决这个和上述问题(为什么它没有自动复制 pm 文件)?谢谢你的时间!