I am trying to install version 4.02.3 of OCaml on MacOS 10.14.6 with the following command
brew install ocaml@4.02.3
but I get an error
Error: No available formula with the name "ocaml@4.02.3"
I need that specific version to compile unison
with that specific version, so I can use unison
between a Linux box (where I cannot install a different version of ocaml
and the Mac).
Best Answer
You can use the git history to obtain the formula for OCaml 4.02.3
Go to the local directory where formulas are stored:
Look at the history of the OCaml formula:
It appears that the last commit of version 4.02.3 is commit
3cdad82334496ca9fe8d8fb37
.Check out this commit:
By default, Homebrew make an update before an install, so you have to specify to not update before the install:
Check that you have the right version with:
When finished, don't forget to go back to the master branch, in the
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
directory: