Windows中的Nutch 1.14给出异常java.lang.UnsatisfiedLinkError:org.apache.hadoop.io.nativeio.NativeIO $ Windows.access0(Ljava / lang / String; I)Z

时间:2018-07-08 14:36:22

标签: hadoop nutch

While I am running Apache Nutch 1.14 I am getting following exception.

Injector: starting at 2018-07-08 10:15:56
Injector: crawlDb: crawl/crawldb
Injector: urlDir: urls
Injector: Converting injected urls to crawl db entries.
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
        at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
        at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:609)
        at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:977)
        at org.apache.hadoop.util.DiskChecker.checkAccessByFileMethods(DiskChecker.java:187)

我已经安装了Java,并将hadoop本机库(即winutils.exe)放在c:\ winutil \ bin中,并指向HADOOP_HOME。

不确定如何解决该问题,也找不到任何有关如何在Windows中运行Nutch 1.14的文档。如果有人可以解决,请告诉我。

1 个答案:

答案 0 :(得分:0)

我发现解决该错误的唯一方法是通过此线程: Nutch on windows: ERROR crawl.Injector

关键是注释掉以下行:

JAVA_LIBRARY_PATH="`cygpath -p -w "$JAVA_LIBRARY_PATH"`"

阅读$ NUTCH_HOME / lib / native下的README.txt,以获取有关hadoop二进制文件的更多信息,这是JAVA_LIBRARY_PATH所引用的。