Install Clojure

Here's a quick, straightforward way to install Clojure on MacOS.

Install Java

First, you need the JDK. You can get that in a lot of ways. It's nice to have a utility to help you manager versions of the Java JDK. Jabba is such a version manager. Install it with:

curl -sL | bash && . ~/.jabba/

Now with jabba, you can install the JDK. List what's available with:

jabba ls-remote

Then choose one to install, such as:

jabba install openjdk@1.17.0

If you already have a JDK installed with jabba, switch to use it:

jabba use openjdk@1.17.0

Install Clojure

If you're on Mac, you probably have brew installed. If not, get that. Then use brew to install Clojure:

brew install clojure/tools/clojure

Try it out

Now you should be able to start up a Clojure REPL with:

$ clojure

Clojure 1.11.1
user=> (+ 1 1)

Installed. Now go and wrap your life in parens.