【发布时间】:2013-11-06 10:25:41
【问题描述】:
我尝试过使用 ActiveState 和 Strawberry,但每次运行时都会收到相同的错误消息
cpan install WordNet::Similarity
把它缩短到这个输出:
C:\strawberry\perl\bin\perl.exe "-Iblib\arch" "-Iblib\lib" build/Depthfiles.PL b
lib\lib/WordNet/synsetdepths.dat
Generating default depth files.
Loading WordNet::QueryData... done
Finding depths of noun taxonomies... (getSense) Internal error: offset=00002342
pos=n at C:/strawberry/perl/site/lib/WordNet/QueryData.pm line 633, <GEN8> line
1.
Compilation failed in require at build/Depthfiles.PL line 27, <GEN8> line 1.
dmake.exe: Error code 255, while making 'blib\lib\WordNet\synsetdepths.dat'
TPEDERSE/WordNet-Similarity-2.05.tar.gz
C:\strawberry\c\bin\dmake.exe -- NOT OK
CPAN: YAML::XS loaded ok (v0.41)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Stopping: 'install' failed for 'WordNet::Similarity'.
早些时候我遇到了 WordNet 缺少一些 .dat 文件的问题,但我在 Ted Pedersen 邮件存档的帮助下解决了这个问题。但是这个真的让我卡住了。有人知道吗?
更新:
好的,我现在在 Ubuntu 中工作,但现在我遇到了不同的问题:
# Failed test at t/trace.t line 141.
# got: '4'
# expected: '0'
# lesk: The lines 'Overlaps: 1 x "the" 1 x "small" 1 x "of" 2 x "any" 1 x "in the" 1 x "or" 1 x "resembling the" 1 x "and" ' and 'Overlaps: 1 x "the" 1 x "small" 1 x "in the" 1 x "or" 1 x "of" 1 x "resembling the" 2 x "any" 1 x "and" ' differ
t/trace.t ......... 107/132 # Looks like you failed 1 test of 132.
t/trace.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/132 subtests
t/vector.t ........ ok
t/vector_pairs.t .. ok
t/wn30loop.t ...... ok
t/wup.t ........... ok
Test Summary Report
-------------------
t/trace.t (Wstat: 256 Tests: 132 Failed: 1)
Failed test: 76
Non-zero exit status: 1
Files=22, Tests=2027, 136 wallclock secs ( 0.68 usr 0.05 sys + 132.59 cusr 3.44 csys = 136.76 CPU)
Result: FAIL
Failed 1/22 test programs. 1/2027 subtests failed.
make: *** [test_dynamic] Error 255
TPEDERSE/WordNet-Similarity-2.05.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports TPEDERSE/WordNet-Similarity-2.05.tar.gz
Running make install
make test had returned bad status, won't install without force
【问题讨论】:
-
只是一个想法:也许模块缺少一些
binmode()调用? -
好的,我有空的时候去看看。我猜你注意到了,但这是在 Windows(8.1)上,我没有尝试在 Ubuntu 中安装它。有空的时候我也可以试试 :)
-
这就是为什么我建议添加
binmode()电话。由于可能的\r\n -> \n翻译,Windows 机器上的偏移很可能已关闭。
标签: perl similarity