Installing leiningen 2 on Ubuntu
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.
Related videos on Youtube
Zuriar
Updated on June 04, 2022Comments
-
Zuriar almost 2 years
I have followed the instructions here:
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 over 9 yearsthanks, I have followed those instructions step-by-step. However, when I run 'lein' I get nothing
-
-
Nathan Basanese about 7 years// , Where do you get
~/bin/lein.sh
in the first place? This answer raises more questions. -
Ganesh Satpute over 4 yearsOr I could just do
sudo apt install leiningen