当我在mac上安装Wordnet::Similarity
时,会发生以下错误:
usr/local/bin/perl "-Iblib/arch" "-Iblib/lib" build/Depthfiles.PL blib/lib/WordNet/synsetdepths.dat
Generating default depth files.
Can't load '/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle' for module Digest::SHA1: dlopen(/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle, 1): no suitable image found. Did find:
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle: mach-o, but wrong architecture at /usr/local/lib/perl5/5.8.8/darwin-2level/DynaLoader.pm line 230.
at blib/lib/WordNet/Tools.pm line 76
Compilation failed in require at blib/lib/WordNet/Tools.pm line 76.
我的尝试是从终端进入下载的包目录并输入:
perl Makefile.PL
make
make test
sudo make install
我确保安装了所有先决条件http://search.cpan.org/dist/WordNet-Similarity/doc/install.pod#Prerequisites。我怀疑这可能是由于带有Perl接口的mac处理器版本。关于如何解决这个问题的任何建议?
答案 0 :(得分:0)
在Ubuntu 14.04中安装libdigest-sha-perl解决了这个问题。
下载链接:http://packages.ubuntu.com/trusty/amd64/perl/libdigest-sha-perl