Time :: ParseDate安装失败

时间:2013-11-13 14:44:45

标签: windows perl module cpan

我正在尝试安装一个模块来操作HHMMSS格式的时间 - 只是为了找到基本的时差等等。 Time :: ParseDate看起来是一个完美的候选人,但我在安装它时遇到了一些麻烦。

我正在使用为MSWin32-x64多线程构建的perl 5,版本16,subversion 3(v5.16.3)。

命令:

cpan Time::ParseDate 

返回

Set up gcc environment - 4.4.7 20111023 (prerelease) [svn/rev.180339 - mingw-w64/oz]
Checking if your kit is complete...
Looks good
Writing Makefile for Time::ParseDate
Writing MYMETA.yml and MYMETA.json
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Cannot copy 'lib/Time/JulianDay.pm' to 'blib\lib\Time\JulianDay.pm': No such     file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
dmake.exe:  Error code 130, while making 'pm_to_blib'
  MUIR/modules/Time-ParseDate-2013.0920.tar.gz
  C:\Dwimperl\c\bin\dmake.exe -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

有人能解释究竟出了什么问题吗?看起来我错过了lib / Time / JulianDay.pm,但为什么呢?我是否必须更新我的Perl版本或我的Cpan版本?

我删除了Autorun注册表项,然后重试了安装。我得到了:

CPAN: Term::ANSIColor loaded ok (v4.02)
CPAN: Storable loaded ok (v2.34)
Reading 'C:\Perl64\cpan\Metadata'
  Database was generated on Tue, 05 Nov 2013 20:53:02 GMT
 Running install for module 'Time::ParseDate'
 Running make for M/MU/MUIR/modules/Time-ParseDate-2013.0920.tar.gz
 CPAN: Digest::SHA loaded ok (v5.84)
   CPAN: Compress::Zlib loaded ok (v2.06)
 Checksum for C:\Perl64\cpan\sources\authors\id\M\MU\MUIR\modules\Time-ParseDate-2013.0920.tar.gz ok
 CPAN: Archive::Tar loaded ok (v1.90)
 Time-ParseDate-2013.0920/
 etc...
Time-ParseDate-2013.0920/t/datetime.t
 CPAN: File::Temp loaded ok (v0.22)
 CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120921)
 CPAN: Module::CoreList loaded ok (v2.80)

 CPAN.pm: Building M/MU/MUIR/modules/Time-ParseDate-2013.0920.tar.gz

Set up gcc environment - 4.4.7 20111023 (prerelease) [svn/rev.180339 - mingw-w64/oz]
Checking if your kit is complete...
Looks good
Writing Makefile for Time::ParseDate
Writing MYMETA.yml and MYMETA.json
cp lib/Time/JulianDay.pm blib\lib\Time\JulianDay.pm
cp lib/Time/CTime.pm blib\lib\Time\CTime.pm
cp lib/Time/ParseDate.pm blib\lib\Time\ParseDate.pm
cp lib/Time/DaysInMonth.pm blib\lib\Time\DaysInMonth.pm
cp lib/Time/Timezone.pm blib\lib\Time\Timezone.pm
  MUIR/modules/Time-ParseDate-2013.0920.tar.gz
  C:\Dwimperl\c\bin\dmake.exe -- OK
CPAN: YAML::XS loaded ok (v0.39)
Running make test
C:\Perl64\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib',    'blib\arch')" t/*
t/datetime.t .. ok
t/metdate.t ... skipped: It seems localtime() does not honor $ENV{TZ} when set in the  test script.
t/order1.t .... 1/?
#   Failed test 'Europe/Moscow, DST permanent 2009'
#   at t/order1.t line 34.
#          got: '1257030000'
#     expected: '1257022800'

#   Failed test 'Europe/Moscow, DST permanent 2013'
#   at t/order1.t line 35.
#          got: '1369868400'
#     expected: '1369857600'
# Looks like you failed 2 tests of 5.
t/order1.t .... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests
t/order2.t .... 1/?
#   Failed test 'Europe/Moscow, DST permanent 2013'
#   at t/order2.t line 34.
#          got: '1369868400'
#     expected: '1369857600'

#   Failed test 'Europe/Moscow, DST permanent 2009'
#   at t/order2.t line 35.
#          got: '1257030000'
#     expected: '1257022800'
# Looks like you failed 2 tests of 5.
t/order2.t .... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests

Test Summary Report
-------------------
t/order1.t  (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 2
t/order2.t  (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 2
Files=4, Tests=331,  1 wallclock secs ( 0.09 usr +  0.06 sys =  0.16 CPU)
Result: FAIL
Failed 2/4 test programs. 4/331 subtests failed.
dmake.exe:  Error code 130, while making 'test_dynamic'
  MUIR/modules/Time-ParseDate-2013.0920.tar.gz
  C:\Dwimperl\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MUIR/modules/Time-ParseDate-2013.0920.tar.gz
Running make install
  make test had returned bad status, won't install without force

2 个答案:

答案 0 :(得分:3)

Time-ParseDate的测试套件根本不会传递Windows系统。请参阅http://matrix.cpantesters.org/?dist=Time-ParseDatehttp://matrix.cpantesters.org/?dist=Time-ParseDate;maxver=1。我自己尝试使用Strawberry Perl和ActivePerl,并且测试套件都失败了两个perls(测试需要摆弄TZ环境变量,但这在Windows系统上的工作方式与Unix / Linux系统不同,另请参阅错误报告https://rt.cpan.org/Ticket/Display.html?id=90367)。

您可以尝试通过强制安装或跳过测试来安装未经测试的模块。在CPAN shell中:

force install Date::JulianDay

notest install Date::JulianDay

答案 1 :(得分:1)

似乎“HKCU \ Software \ Microsoft \ Command Processor”中的自动运行设置正在安装期间导航子进程远离当前路径,导致文件在错误的位置创建。