简体   繁体   English

在Ubuntu中使用Nut 1.4

[英]using nutch 1.4 in ubuntu

I try to use nutch 1.4 crawler in ubuntu however when I try to execute nutcg with all the setting that are suggested in nutch wiki it gives this error: 我尝试在ubuntu中使用nutch 1.4搜寻器,但是当我尝试使用nutch Wiki中建议的所有设置执行nutcg时,会出现此错误:

erogol@erogol-G50V:~/Desktop/search engine/apache-nutch-1.4-bin/runtime/local$
bin/nutch crawl urls -dir crawl -depth 1
bin/nutch: line 108: [: /home/erogol/Desktop/search: binary operator expected
Exception in thread "main" java.lang.NoClassDefFoundError: engine/apache-nutch-1/4-bin 
/runtime/local/logs
Caused by: java.lang.ClassNotFoundException: engine.apache-nutch-    
1.4-bin.runtime.local.logs
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: engine/apache-nutch-1.4-bin/runtime/local/logs.      
Program will exit.

Do you have any suggestion or idea to solve the using problem for nutch? 您是否有任何解决螺母使用问题的建议或想法?

Thanks in advance... all nutch knowers :) 预先感谢...所有坚果知识的人:)

The problem isn't about nutch: the space within the search engine folder name creates problems. 问题不在于胡说八道: search engine文件夹名称中的空格会产生问题。 As you can see from the ClassNotFoundException the part after the space is taken as name of the class to be executed. ClassNotFoundException可以看到,空格后的部分被视为要执行的类的名称。 Can't you just rename search engine to something else like search-engine ? 您不能只是将search engine重命名为其他search-engine吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM