我在装有 Java 1.8 的 Windows 10 上使用 Apache Nutch 1.14。我已按照 https://wiki.apache.org/nutch/NutchTutorial 中提到的相同步骤进行操作.
当我尝试使用 cygwin 上的命令将 URL 注入(inject) crawldb 时:bin/nutch inject crawl/crawldb urls
我收到以下错误: 注入(inject)器:java.io.IOException:命令字符串中的(null)条目:null chmod 0644 E:\apache-nutch-1.4\runtime\local\crawl\crawldb.locked 在 org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:773)
我检查了日志,发现了这个:
2018-01-18 10:55:26,785 错误 util.Shell - 无法在 hadoop 二进制路径中找到 winutils 二进制文件 java.io.IOException:无法在 Hadoop 二进制文件中找到可执行文件 null\bin\winutils.exe。
我已经在几个页面上搜索过这个错误,但没有任何帮助。
最佳答案
- 在 Windows 中创建新目录,例如 c:\winutil。
- 在 winutil 中创建 bin 目录
- 打开https://minhaskamal.github.io/DownGit/#/home
- 粘贴https://github.com/steveloughran/winutils/tree/master/hadoop-2.8.1在上面的网站,下载winutil-hadoop2.8.1
- 解压c:\winutil\bin中的zip内容
- 将 HADOOP_HOME 变量添加到您的系统变量并使其指向 c:\winutil
- 在 cygin 中重新运行您的爬网命令
关于Apache Nutch 错误 : Injector: java. io.IOException:命令字符串中的(空)条目:空 chmod 0644,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48314451/