这已被标记为重复项,但在可能的重复项中描述的解决方案是我尝试过的方法,并且对我无效。将OCaml支持添加到bashrc中
我安装了OCaml,安装程序说要将/Users/me/ocamlbrew/ocaml-4.02.3/etc/ocamlbrew.bashrc
添加到我的.bashrc文件中,我这样做似乎并没有帮助。
我必须在每个新的终端窗口上运行/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中
@Kenney我做了一个编辑。 – Bren
好的,应该工作 - 但你仍然必须键入'ocaml'。 – Kenney
@Kenney试过了,它没有奏效。你能否解决这个问题,以便人们回答我的问题。 – Bren