解决:[ERROR] No compiler installed in your current switch

问题描述 投票:0回答:0

我正尝试在我的 Mac 上启动并运行 OCaml,但遇到了问题。

我正在按照here的详细安装说明进行操作。我采取的第一步如下:

  1. 我安装了二进制文件(因为我不想使用 Homebrew 或 MacPort)

    $ bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
    
  2. 然后我通过输入创建了一个新的开关:

    opam init
    
  3. 然后我运行以下命令开始安装平台工具:

    $ bash < <(curl -sL https://ocaml.org/install-platform.sh)
    
  4. 在此之后,我尝试运行命令:

    $ ocaml-platform
    

然而,在这里我遇到了一个问题。当我运行上面的命令时,出现以下错误:

ocaml-platform: [ERROR] No compiler installed in your current switch.

我在这里有点困惑——我确实在我的 Mac 上安装了 gcc,我认为文档说对于 Mac,唯一的要求是安装 Xcode,我也在我的 Mac 上安装了它。

我错过了一步吗?

gcc terminal compiler-errors ocaml
© www.soinside.com 2019 - 2024. All rights reserved.