将OCAML的旧版本添加到OPAM
我正在尝试使用OPAM安装COQ版本8.10.2,并且从此输出中,我假设Coq 8.10.2需要一个带有版本<的OCAML编译器。 4.10
Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler < 3.07+1 | ocaml-system < 3.07+1 | ocaml-variants < 3.8~
unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
unmet availability conditions: 'sys-ocaml-version = "3.07"'
no matching version
.
.
.
* Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler = 4.09.2 | ocaml-system >= 4.09.2 | ocaml-variants < 4.09.3~
no matching version
unmet availability conditions, e.g. 'sys-ocaml-version = "4.14.0"'
unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
的问题是ocaml具有版本&lt; 4.10在OPAM的软件包列表中不可用。运行 OPAM开关列表可用的基础打印此输出
# Listing available compilers from repositories: default
# Name # Version # Synopsis
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-base-compiler 4.12.0~alpha1 First alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha2 Second alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha3 Third alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta1 First beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta2 Second beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~rc1 First release candidate of OCaml 4.12.0
ocaml-base-compiler 4.12.0 Official release 4.12.0
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-base-compiler 4.13.0~alpha1 First alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~alpha2 Second alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~beta1 First beta release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc1 First release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc2 Second release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0 Official release 4.13.0
ocaml-base-compiler 4.13.1 Official release 4.13.1
ocaml-base-compiler 4.14.0~alpha1 First alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~alpha2 Second alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~beta1 First beta release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc1 First release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc2 Second release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0 Official release 4.14.0
我要使用OPAM,因为我需要切换到其他项目的COQ的不同版本。有什么方法可以添加OCAML版本&lt; 4.10去OPAM?
I am trying to install Coq version 8.10.2 using Opam and from this output, I assume Coq 8.10.2 needs an ocaml compiler with version < 4.10
Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler < 3.07+1 | ocaml-system < 3.07+1 | ocaml-variants < 3.8~
unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
unmet availability conditions: 'sys-ocaml-version = "3.07"'
no matching version
.
.
.
* Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler = 4.09.2 | ocaml-system >= 4.09.2 | ocaml-variants < 4.09.3~
no matching version
unmet availability conditions, e.g. 'sys-ocaml-version = "4.14.0"'
unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
and the problem is that ocaml with version < 4.10 is not available in opam's list of packages. Running opam switch list-available base prints this output
# Listing available compilers from repositories: default
# Name # Version # Synopsis
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-base-compiler 4.12.0~alpha1 First alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha2 Second alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha3 Third alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta1 First beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta2 Second beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~rc1 First release candidate of OCaml 4.12.0
ocaml-base-compiler 4.12.0 Official release 4.12.0
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-base-compiler 4.13.0~alpha1 First alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~alpha2 Second alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~beta1 First beta release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc1 First release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc2 Second release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0 Official release 4.13.0
ocaml-base-compiler 4.13.1 Official release 4.13.1
ocaml-base-compiler 4.14.0~alpha1 First alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~alpha2 Second alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~beta1 First beta release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc1 First release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc2 Second release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0 Official release 4.14.0
I want to use Opam because I need to switch to different version of Coq for other project. Is there a way I can add an ocaml version < 4.10 to opam?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何安装特定版本的OCAML?
要安装OCAML的不同版本,您需要创建一个新的开关,例如,
将安装相应的OCAML版本。要获取OCAML可用版本的列表,请使用,
为什么我的系统上没有版本n?
从错误消息中,我可以看到您的系统是ARM64 MACOS,OCAML包装的旧版本的规格明确指定他们是在该系统上不可用,
因此您架构可用的最古老的版本是4.10.1。我只能建议使用虚拟机,码头或其他物理机器。
How to install a specific version of OCaml?
To install a different version of OCaml, you need to create a new switch, e.g.,
Will install the corresponding version of OCaml. To get the list of available versions of OCaml, use,
Why is version N not available on my system?
From the error message, I can see that your system is an ARM64 macOS, and the specifications of the older versions of the OCaml package explicitly specify that they are not available on that system,
So the oldest version that is available for your architecture is 4.10.1. I can only suggest using a virtual machine, docker, or another physical machine.