Native Installation: MacOs
Check if homebrew is installed by entering the following into your terminal:
brew helpIf it returns output other than command not found then homebrew is installed.
Check if macports is installed by typing the following at your terminal.
If you previously installed one of them, make sure it is in working order and fully up-to-date before proceeding.
- If MacPorts already installed run
sudo port selfupdatethen
sudo port upgrade outdatedIf there are any errors, you need to resolve them before proceeding. Often the easiest way to do that is to uninstall the package manager then reinstall it from scratch. See this page for MacPorts instalation instructions.
- If Brew already installed run
- Nothing already installed: install brew. (It is a little more popular.)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"Follow the instructions this script gives you. If you are having trouble, see the brew home page.
Now, you should have one and only one of the two package managers installed. Proceed as follows.
- If Homebrew installed run
brew install opam
If MacPorts installed run
sudo port install opam
After installing opam, continue with the OPAM configuration instructions.