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

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (603)
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。如果有人有解决方案,请告诉我。

提问于
用户回答回答于

我找到解决该错误的唯一方法是从这个线程: 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引用的内容。

扫码关注云+社区

领取腾讯云代金券