Reputation: 429
I've made a few attempts to install OPAM system-wide via Homebrew and opam init
, but I haven't gotten it to work yet. How should I go about trying this again?
Upvotes: 2
Views: 678
Reputation: 35280
First of all it is not recommended to install it system wide. But if you still want, then this are the steps:
sudo brew install opam
# installs opam
executable system-widesudo mkdir -p /opt/opam
# create a home for opamsudo opam init --root=/opt/opam --comp=4.02.1
eval $(opam config env)
# activate the environment ocaml
# run ocaml to make sure, that everything went fineSome footnotes: I'm expecting that you've failed on your previous attempts, because you didn't specify the compiler version and didn't install system compiler. I still suggest you to reconsider, and install opam
locally. To do that you need to perform the following:
brew install opam
# installs opam
executable system-wideopam init --comp=4.02.1
eval $(opam config env)
# activate the environment ocaml
# run ocaml to make sure, that everything went fineUpvotes: 5