Installing Leiningen for use with Clojure

vramon picture vramon · Nov 18, 2012 · Viewed 12.3k times · Source

I'm trying to install Leiningen on my local machine to get Clojure running, but I can't seem to get the latest version.

I'm following the instructions on github here: https://github.com/technomancy/leiningen

I'm able to put the script in my path, and get Lein to download, but for some reason when I run lein version I keep getting

Leiningen 1.7.1 on Java 1.6.0_33 Java HotSpot(TM) 64-Bit Server VM

I've tried deleting and re-installing Leiningen several times, but nothing changes. Are there certain files I need to be deleting, or is there some way to switch versions? lein upgrade doesn't seem to do anything.

Thanks in advance.

Answer

Stuart McConnell picture Stuart McConnell · Jan 5, 2013

An easier way of upgrading (if using homebrew) is to upgrade using homebrew and specify the version.

  1. Show available versions

     brew info leiningen
     leiningen: stable 1.7.1, devel 2.0.0-preview10, HEAD
    
  2. Install or upgrade to a specific version

    brew upgrade --devel leiningen
    ...
    /usr/local/Cellar/leiningen/2.0.0-preview10: 5 files, 80K, built in 10 seconds
    
  3. Use lein as normal

    lein version
    Leiningen 2.0.0-preview10 on Java 1.7.0_06 Java HotSpot(TM) 64-Bit Server VM