1

Running a tool, I had to install Perl. Well, I've installed Strawberry-Perl and some modules fine. But when I make Statistics::Basic, it fails.

The process to make the module:

  • perl Makefile.PL (OK)
  • dmake test (FAIL)

C:\Perl\perl\lib\Basic>dmake test C:\Perl\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/05_load_them.t ................... # Test 1 got: "Can't locate Number/Format.pm in @INC (you may need to install the Number::Format module ) (@INC contains: C:\Perl\perl\lib\Basic\blib\lib C:\Perl\perl\lib\Basic\blib\arch C:/Perl/perl/site/lib C:/Perl/perl/vendor/lib C:/Perl/perl/lib .) at C:\Perl\perl\lib\Basic\blib\lib/Statistics/Basic.pm line 8.\nBEGIN failed--compilation aborted at C:\Perl\pe rl\lib\Basic\blib\lib/Statistics/Basic.pm line 8.\nCompilation failed in require at C:\Perl\perl\lib\Basic\blib\lib/Statistics/Bas ic/_OneVectorBase.pm line 7.\nBEGIN failed--compilation aborted at C:\Perl\perl\lib\Basic\blib\lib/Statistics/Basic/_OneVectorBase.pm line 7.\nCompilation failed in require at (eval 1) line 2.\nBEGIN failed--compilation aborted at (eval 1) line 2.\n" (t/05_load_them.t at li ne 12) t/05_load_them.t ................... 1/12 # Expected: "" # t/05_load_them.t line 12 is: ok($@, "");

. . .

I don't know Perl and I have no idea about the problem. How can I install this module?

4

3 回答 3

5

错误消息说

you may need to install the Number::Format module

所以先做这个。由于可能存在更多依赖项,通常最好使用自动解决所有依赖项的工具,例如 CPAN.pm:

cpan Statistics::Basic
于 2013-07-18T09:48:19.587 回答
2

我对模块 Statistics::Basic 也有同样的问题,所以尝试安装Number::Format,但问题又dmake test失败了!

所以我刚刚尝试了make install命令,然后安装了模块,它就可以工作了。

于 2015-02-16T12:26:23.387 回答
0

我在 Windows 中。dmake install手动执行即可解决。

# install will be failed but you can get source downloaded
> cpan install Number::Format
> cd c:\strawberry\cpan\build
# replace [version] and [random string] with what you see in the directory
> cd Number-Format-[version]-[random string]
# ignore `dmake test`
> dmake install
于 2015-03-10T06:04:56.670 回答