【问题标题】:How to fix errors during the building snowball tool from sources?如何从源代码构建雪球工具期间修复错误?
【发布时间】:2022-11-11 22:48:41
【问题描述】:

我已经下载了https://github.com/snowballstem/snowball 的源代码并尝试通过官方guide 在我的机器上构建它。

不幸的是,我得到了一个错误

make: *** 没有使目标“安装”的规则。停止。

重现步骤:

$ git clone https://github.com/snowballstem/snowball.git
...
Resolving deltas: 100% (3092/3092), done.
$ make
libstemmer/mkalgorithms.pl algorithms.mk libstemmer/modules.txt
cc -O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations   -c -o compiler/space.o compiler/space.c
...
$ sudo make install
make: *** No rule to make target 'install'.  Stop.

操作系统:Ubuntu 22.04

我也在这里创建了一个问题https://github.com/snowballstem/snowball/issues/170

我希望 Snowball 指南中的所有说明都能正常运行。

【问题讨论】:

  • 是什么让你认为你应该运行make install?我在 GitHub 站点中没有看到任何关于这种效果的说明,当然,就像制作报告一样,GNUmakefile 没有定义install 规则。
  • 本指南中有项目sudo make installsnowballstem.org/runtime/use.html 截图i.imgur.com/MUqn4ri.png
  • 好吧,我在 makefile 中找不到 install 规则,因此在 GitHub 站点上提交问题是正确的举措。询问 SO 是没有意义的:这要么是该项目的 makefile 中的错误,要么是该项目文档中的错误。
  • 那么,在这种情况下,需要关闭这个问题并继续讨论 GitHub 问题吗?
  • 那将是我的建议。

标签: installation makefile gnu-make ubuntu-22.04 snowball


【解决方案1】:

OP的解决方案从问题迁移到了答案:

深入挖掘后,发现运行make就够了,而且效果很好:

echo "running" | ./stemwords -l en
run

指南也更新了https://snowballstem.org/runtime/use.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-08
    • 2019-03-06
    • 2020-04-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多