Installing leiningen 2 on Ubuntu

17,275

Solution 1

Posting this as it might help other users.

Follow the install instructions.

Please make sure the leiningen script that the install instructions is on your executable PATH.

The script is the entry point to leiningen commands, so it's still needed after the downloads are complete.

It takes care of setting up environmental variables, paths and everything else required to run leiningen, so you can use

lein <command>

instead of

java -cp <whatever>:~/.lein/self-installs/leiningen-2.4.3-standalone.jar ... clojure.main -m leiningen.core.main <command>

Solution 2

On ubuntu, its quite easy. Download executable file, make it executable and place it in system path.

$ wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
$ chmod +x lein
$ sudo mv lein /usr/local/bin

You can also move it any directory which is in system path.

$ lein -v
Leiningen 2.6.1 on Java 1.8.0_77 Java HotSpot(TM) 64-Bit Server VM

Solution 3

I got the same doubt. Solved it. By following the instructions everything will be set for you. Next run the previously used script lein.sh in bin for creating projects as below.

suppose ~/bin/lein.sh is your script location ,then

$ ~/bin/lein.sh new test-project
$ ~/bin/lein.sh --help 

It will create the project in your bin folder it self.If you wish to access that lein.sh globally then include it in $PATH.

Share:
17,275

Related videos on Youtube

Zuriar
Author by

Zuriar

Updated on June 04, 2022

Comments

  • Zuriar
    Zuriar almost 2 years

    I have followed the instructions here:

    leiningen.org

    To install from the lein script. I now have:

    ~/.lein/self-installs/leiningen-2.4.3-standalone.jar

    How do I now run leiningen? The instructions are not clear.

    • Zuriar
      Zuriar over 9 years
      thanks, I have followed those instructions step-by-step. However, when I run 'lein' I get nothing
  • Nathan Basanese
    Nathan Basanese about 7 years
    // , Where do you get ~/bin/lein.sh in the first place? This answer raises more questions.
  • Ganesh Satpute
    Ganesh Satpute over 4 years
    Or I could just do sudo apt install leiningen