Apache Nutch - NoSuchMethodError 错误

Apache Nutch - NoSuchMethodError

我已经在 Windows 上安装了 Apache Nutch,我正在尝试 运行 进行简单的抓取,但出现以下错误:

$ bin/crawl urls crawled 3
Injecting seed URLs
/cygdrive/c/Users/Simon/OneDrive/apache-nutch-1.11-bin/apache-nutch-1.11/bin/nutch inject crawled/crawldb urls
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.cli.OptionBuilder.withArgPattern(Ljava/lang/String;I)Lorg/apache/commons/cli/OptionBuilder;
        at org.apache.hadoop.util.GenericOptionsParser.buildGeneralOptions(GenericOptionsParser.java:207)
        at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:370)
        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)
        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:138)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:59)
        at org.apache.nutch.crawl.Injector.main(Injector.java:369)
Error running:
  /cygdrive/c/Users/Simon/OneDrive/apache-nutch-1.11-bin/apache-nutch-1.11/bin/nutch inject crawled/crawldb urls
Failed with exit value 1.

如有任何帮助,我们将不胜感激。

谢谢

通过安装较早版本的 Nutch (1.4) 解决了该问题。问题是某些较新版本的 hadoop 在 windows 中无法正常工作。