我试图设置Apache Nutch来抓取URL,遵循
this指南.作为一个老指导(本指南是1.x,我使用2.3),我已经对结构进行了必要的更改.但是,当我尝试运行爬网,我得到这个错误:
root@IndiStage:~# /usr/local/nutch/framework/apache-nutch-2.3/src/bin/crawl urls FirstCrawl 2 No SOLRURL specified. Skipping indexing. Injecting seed URLs /usr/local/nutch/framework/apache-nutch-2.3/src/bin/nutch inject urls -crawlId FirstCrawl Error: Could not find or load main class org.apache.nutch.crawl.InjectorJob Error running: /usr/local/nutch/framework/apache-nutch-2.3/src/bin/nutch inject urls -crawlId FirstCrawl Failed with exit value 1. root@IndiStage:~#
作为Ubuntu的新功能(14.04),我很难管理这里的目录结构和路径.
InjectorJob位于/usr/local/nutch/framework/apache-nutch-2.3/src/java/org/apache/nutch/crawl中
JAVA_HOME设置为/usr/lib / jvm / java-7-openjdk-amd64
解决方法
确保您已经编译了Nutch源代码.然后,从${APACHE_NUTCH_HOME} / runtime / local(或${APACHE_NUTCH_HOME} / runtime / deploy / bin)运行crawl命令.
希望这可以帮助,
Le Quoc做