Bash - 安装 Ocaml-top
Bash - installing Ocaml-top
我正在尝试从命令行安装 Ocaml-Top IDE。我已经使用 Homebrew 安装了 Ocaml 和 OPAM(brew install opam,brew install ocaml),但是当我输入:
opam install ocaml-top
我明白了
[ERROR] No OPAM root found at /Users/student/.opam.
我需要将它添加到我的 PATH 中吗?
更新:建议有帮助,但包名有问题:我得到
[ERROR] No package named ocaml-top found.
您似乎错过了以下警告,特别是 opam init
,当您 运行 brew install opam
:
$ brew info opam
...
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running (as a normal user):
$ opam init
Run the following to initialize your environment variables:
$ eval `opam config env`
To export the needed variables every time, add them to your dotfiles.
* On Bash, add them to `~/.bash_profile`.
* On Zsh, add them to `~/.zprofile` or `~/.zshrc` instead.
Documentation and tutorials are available at https://opam.ocaml.org, or
via "man opam" and "opam --help".
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
我正在尝试从命令行安装 Ocaml-Top IDE。我已经使用 Homebrew 安装了 Ocaml 和 OPAM(brew install opam,brew install ocaml),但是当我输入:
opam install ocaml-top
我明白了
[ERROR] No OPAM root found at /Users/student/.opam.
我需要将它添加到我的 PATH 中吗?
更新:建议有帮助,但包名有问题:我得到
[ERROR] No package named ocaml-top found.
您似乎错过了以下警告,特别是 opam init
,当您 运行 brew install opam
:
$ brew info opam
...
==> Caveats
OPAM uses ~/.opam by default for its package database, so you need to
initialize it first by running (as a normal user):
$ opam init
Run the following to initialize your environment variables:
$ eval `opam config env`
To export the needed variables every time, add them to your dotfiles.
* On Bash, add them to `~/.bash_profile`.
* On Zsh, add them to `~/.zprofile` or `~/.zshrc` instead.
Documentation and tutorials are available at https://opam.ocaml.org, or
via "man opam" and "opam --help".
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions