Prolog - 特别是 SWI - pl 位于哪里?
我正在尝试设置一个包含 interprolog 和 SWI prolog 的环境,interprolog 需要 swi 的“pl”的位置,但我找不到它。我能找到的只是 swipl 或 plrc,两者都不能与 interprolog 一起使用。如果我在终端中输入 pl(这应该运行 swi-prolog),它会说,
bash: pl :command not found
但如果我输入
swipl
或
prolog
,它会正常运行 swiprolog。
问题是 interprolog 需要 pl,我似乎找不到。
有人知道我该如何解决这个问题吗?
谢谢
I'm trying to set up an environment with interprolog and SWI prolog, interprolog needs the location of swi's "pl" but i cant find it. All i can find is swipl or plrc and neither work with interprolog. If i type pl into the terminal(this should run swi-prolog) it says
bash: pl :command not found
but if i type in
swipl
or
prolog
it runs swiprolog fine.
the thing is interprolog requires pl, which i cant seem to find.
anyone have any ideas how i can get around this?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不确定你是否已经解决了。理想情况下,您应该执行以下操作:
runSWISPListener.sh
。${SWI_BIN_DIRECTORY}/pl
更改为${SWI_BIN_DIRECTORY}/swipl
这样就可以正常工作了。
I am not sure if you have it worked out. Ideally, this is what you should do:
runSWISPListener.sh
.${SWI_BIN_DIRECTORY}/pl
to${SWI_BIN_DIRECTORY}/swipl
It will then work fine.
我是否理解你的问题,pl 是 prolog 软件的符号链接吗?通过
where pl
检查pl
可执行文件的位置或也许您需要使 prolog 源代码
.pl
可执行并在其顶部添加标头...并使用
chmod u+x some_file.pl
。然后,当 bash 执行时,它会检查文件的顶部 '#! /bin/swiprolog -f',我使用 '-f' 开关将其传递到 prolog 解释器中...检查您的文档...希望这有帮助,
此致,
汤姆.
Have I understood your question, Is pl a symbolic link to the prolog software? Check the location of the
pl
executable bywhere pl
ormaybe you need to make the prolog source code
.pl
executable and add a header at the top of it...And use
chmod u+x some_file.pl
. Then when bash executes, it checks to see the top bit of the file '#! /bin/swiprolog -f', I'm using the '-f' switch to say pass it into the prolog interpreter...check your documentation...Hope this helps,
Best regards,
Tom.
会告诉你 swipl 二进制文件的位置。
但是,您需要某种方法使“pl”与“swipl”含义相同。
为此,您需要将 pl 别名为 swipl。
代码
alias pl='swipl'
将在 BASH 中执行此操作。因此,在别名之后,您可以从命令行启动 interprolog 并查看它是否有效。
will tell you where the swipl binary lives.
However, you need some way to make "pl" mean the same thing as "swipl"
To do that, you need to alias pl to swipl.
The code
alias pl='swipl'
will do that in BASH.so after aliasing, you could start interprolog from the command line and see if it works.