如何安装 Coq

How to install Coq

我一直在使用 https://coq.inria.fr/ for both Windows and Mac. However, when I try coqc or coqtop on terminal or command prompt I get error messages saying that the command is not found. Although with that being said, I can still run Coq almost perfectly fine on the Coq IDE but when I compile buffer, in particularly the exercises from Software Foundations 的下载链接安装 Coq,我收到以下消息。

Running: coqc -I '/Users/zhangsheng/Desktop/G/repos/Coqy/cis500' '/Users/zhangsheng/Desktop/G/repos/Coqy/cis500/Basics.v' 2>&1

据我所知,2>&1 似乎是某种形式的误导,我认为这就是 coqccoqtop 似乎对我的 [ 不起作用的原因=24=]提示。

有人可以建议 'best' 在 Mac 或 Windows 或两者上安装 Coq 的方法,这样我就不会遇到上面提到的问题吗?

虽然我不是 Windows 或 OSX 用户,但我想您遇到这个问题是因为 Coq 安装程序不更新系统的 PATH 变量。该变量是终端用来查找与您键入的命令对应的程序的目录列表。如果您不想通过其他方法安装 Coq,您可能应该找到 coqccoqtop 二进制文件的安装位置,并将这些目录添加到您的 PATH。以下是有关如何执行此操作的一些参考资料:OSX, Windows.