草庐IT

windows - Time::ParseDate 安装失败

coder 2024-06-09 原文

我正在尝试安装一个模块来操作 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

最佳答案

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 外壳中:

force install Date::JulianDay

notest install Date::JulianDay

关于windows - Time::ParseDate 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19956693/

有关windows - Time::ParseDate 安装失败的更多相关文章

  1. ruby - 在 Ruby 程序执行时阻止 Windows 7 PC 进入休眠状态 - 2

    我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0

  2. ruby - 在 64 位 Snow Leopard 上使用 rvm、postgres 9.0、ruby 1.9.2-p136 安装 pg gem 时出现问题 - 2

    我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po

  3. ruby - 完全离线安装RVM - 2

    我打算为ruby​​脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn

  4. ruby-on-rails - rails 目前在重启后没有安装 - 2

    我有一个奇怪的问题:我在rvm上安装了ruby​​onrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(

  5. ruby - 如何为 emacs 安装 ruby​​-mode - 2

    我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby​​提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs

  6. ruby-on-rails - 无法在centos上安装therubyracer(V8和GCC出错) - 2

    我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e

  7. ruby - 通过 RVM (OSX Mountain Lion) 安装 Ruby 2.0.0-p247 时遇到问题 - 2

    我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search

  8. ruby - 如何在 Lion 上安装 Xcode 4.6,需要用 RVM 升级 ruby - 2

    我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121

  9. ruby - Fast-stemmer 安装问题 - 2

    由于fast-stemmer的问题,我很难安装我想要的任何ruby​​gem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=

  10. ruby - 即使失败也继续进行多主机测试 - 2

    我已经构建了一些serverspec代码来在多个主机上运行一组测试。问题是当任何测试失败时,测试会在当前主机停止。即使测试失败,我也希望它继续在所有主机上运行。Rakefile:namespace:specdotask:all=>hosts.map{|h|'spec:'+h.split('.')[0]}hosts.eachdo|host|begindesc"Runserverspecto#{host}"RSpec::Core::RakeTask.new(host)do|t|ENV['TARGET_HOST']=hostt.pattern="spec/cfengine3/*_spec.r

随机推荐