OSX 10.11/10.10 Installation

We support two package management systems for OS X – homebrew and macports.

Lean is continuously under development, and we recommend updating periodically to ensure that the library is up to date and that you have the latest features.

Homebrew

Make sure you have homebrew installed. Use the following commands to install Lean using Homebrew:

brew tap leanprover/lean
brew install lean

To upgrade lean to the latest version, run the following commands:

brew update && brew upgrade lean

Macports

Make sure you have macports installed. Edit /opt/local/etc/macports/sources.conf (admin privilege required) and add the following line before the default source (one starting with rsync):

https://leanprover.github.io/macports/ports.tar

To install Lean, run the following commands:

sudo port -v sync
sudo port install lean

To upgrade lean to the latest version, run the following commands:

sudo port -v sync
sudo port upgrade lean

Setting up emacs

Make sure that you have emacs installed:

  • If you’re using homebrew, do brew install emacs --with-cocoa && brew linkapps emacs
  • If you’re using macports, do sudo port install emacs
  • You can also visit emacsformacosx.com to get a pre-compiled binary of emacs.

To configure Emacs to work with Lean, follow the instructions here.