Leiningen will help you create, build and deploy your Clojure projects.
Install the Leiningen tool using the specific instructions for your Operating System
{% tabs linux="Linux", homebrew="Homebrew", gitbash="GitBash", chocolatey="Chocolatey", windows="Windows Manual" %}
{% content "linux" %}
Download the lein script to your local bin
directory. Then make the lein
script executable and run lein
to download the full version.
mkdir ~/bin
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/bin/lein
chmod u+x ~/bin/lein
lein
If the command lein
is not found, run source ~/.bashrc
to ensure your bin
directory is on the path.
{% content "homebrew" %} If you have Homebrew installed, run the following command in a terminal window.
brew install leiningen
{% content "gitbash" %}
GitBash allows you to use the Linux lein
script, which causes have less issues when installing on Windows.
Download Git, double click the file and follow the install wizard accepting all the defaults (there are quite a few, sorry).
Create a directory called C:\Users\your-user-name\AppData\Local\Programs\Leiningen
, where your-user-name
is your windows login name.
Download the lein script save it to the above directory
Open Environment variables for your account
and add the directory to your path
Open GitBash application and a terminal window will open. Run the command: lein
The full version of Leiningen will be downloaded and Leiningen is ready to use.
{% content "chocolatey" %}
If you have Chocolatey installed, add the Leiningen package by running the following command in a terminal window.
choco install lein
{% content "windows" %}
####WARN::lein.bat method does not always work We recommend using the GitBash approach for Windows
Create a directory called C:\Users\your-user-name\AppData\Local\Programs\Leiningen
Download the lein.bat
file and save it to the above directory
Open Environment variables for your account
and add the directory to your path
Open a command window and run the command: lein
The full version of Leiningen will be downloaded and Leiningen is ready to use.
If you get an error that leiningen-x-x-x-standalone.jar cannot be found
, please use the GitBash approach.
{% endtabs %}
Open a terminal and use the following command
lein
If a list of Leiningen commands is shown then it is working correctly.