将 OCaml 支持添加到 bashrc
Adding OCaml support to bashrc
这已被标记为重复,但可能的重复中描述的解决方案是我尝试过的,但对我不起作用。
我安装了 OCaml,安装程序说要将 /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
添加到我的 .bashrc 文件中,我这样做了,但似乎没有帮助。
我必须在每个新终端 window 上 运行 /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
才能使用 Ocaml
作为命令。我该怎么做才能避免这种情况?
这是我试过的:
alias ocaml = source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
我也试过了
source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
我试过编辑我的 ~/.bashrc 文件和我的 ~/.bash_profile
我最终将 source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
添加到我的 ~/.bash_profile
(安装程序谎称在哪里执行此操作),然后从终端调用 source ~/.bash_profile
。
这已被标记为重复,但可能的重复中描述的解决方案是我尝试过的,但对我不起作用。
我安装了 OCaml,安装程序说要将 /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
添加到我的 .bashrc 文件中,我这样做了,但似乎没有帮助。
我必须在每个新终端 window 上 运行 /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
才能使用 Ocaml
作为命令。我该怎么做才能避免这种情况?
这是我试过的:
alias ocaml = source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
我也试过了
source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
我试过编辑我的 ~/.bashrc 文件和我的 ~/.bash_profile
我最终将 source /Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
添加到我的 ~/.bash_profile
(安装程序谎称在哪里执行此操作),然后从终端调用 source ~/.bash_profile
。