Windows 上的 Apache Nutch
有人尝试过在 Windows 上安装 Nutch 吗? 我正在遵循此安装指南:http://zillionics.com/resources/articles/NutchGuideForDummies。 htm
经过几次颠簸后,我在尝试运行爬虫时陷入困境。 它给了我这个错误:
bin/nutch: line 15:在意外标记'$'in\r''附近出现语法错误 'in/nutch: line 15: 'case "'uname'" in
显然我需要在 cygwin 中安装 uname 实用程序,但我在任何地方都找不到它。 有谁知道它在哪个包中或者是否有其他方法来解决这个问题?
Has anyone tryed to install Nutch on Windows? I'm following this installation guide: http://zillionics.com/resources/articles/NutchGuideForDummies.htm
After a few bumps I'm stuck trying to run the crawler. It gives me this error:
bin/nutch: line 15: syntax error near unexpected token '$'in\r''
'in/nutch: line 15: 'case "'uname'" in
Apparently I need to install the uname utility in cygwin but I can't find it anywhere. Does anyone know in which package is it in or if there another way to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题不在于 uname 丢失。 问题在于 nutch 脚本的行终止不正确。 我执行以下操作:
1)在 vi 中打开 nutch
2):set ff=unix
3):wq
The problem isn't that uname is missing. The problem is that the nutch script has incorrect line termination. I do the following:
1) open nutch in vi
2) :set ff=unix
3) :wq
好吧,我找到了解决方案:安装了 uname 这不是问题。 奇怪的是 shell 脚本是 DOS 文本格式而不是 Unix 文本格式。 使用“d2u”命令转换此文件解决了该问题。
Well I've found the solution to this: uname was installed that was not the problem. The weird thing is that the shell scripts are in DOS text format instead of Unix text format. Using the 'd2u' command to convert this files fixed the problem.