如何安装与ocaml版本4.05.0兼容的camlp5?

如何安装与ocaml版本4.05.0兼容的camlp5?,ocaml,coq,camlp4,Ocaml,Coq,Camlp4,我正试图按照说明安装tcoq和gamepad,但出现了以下错误: make /Library/Developer/CommandLineTools/usr/bin/make --warn-undefined-variable --no-builtin-rules -f Makefile.build OCAMLC -c -pp grammar/gramCompat.mlp >> Fatal error: OCaml and preprocessor have incompatible

我正试图按照说明安装tcoq和gamepad,但出现了以下错误:

make
/Library/Developer/CommandLineTools/usr/bin/make --warn-undefined-variable --no-builtin-rules -f Makefile.build
OCAMLC -c -pp grammar/gramCompat.mlp
>> Fatal error: OCaml and preprocessor have incompatible versions
Fatal error: exception Misc.Fatal_error
make[1]: *** [grammar/gramCompat.cmo] Error 2
make: *** [submake] Error 2
所以我发现我的campl5版本不对:


由于我需要的是与ocaml 4.05.0兼容的,根据和。

为了安装与给定版本的ocaml兼容的ocaml包,我建议您使用opam。通过观察,我认为情况已经如此

要为活动开关安装正确版本的camlp5,即在您的情况下为Ocaml 4.05.0安装正确版本的camlp5,请运行以下命令:

opam install camlp5
它将下载所需的依赖项并将其安装到本地opam安装文件夹中

但是,如果您已经通过最喜爱的数据包管理器(如brew)安装了另一个版本的camlp5,则这可能会导致一些问题。有关更多详细信息,请参阅我对的回答

opam install camlp5