How do I upgrade lein in Ubuntu OS?
Asked Answered
S

2

6

I am on Ubuntu 14.04.2 LTS.

I want to run LightTable (downloaded from the official GitHub website). When I run the script, it says that I need leiningen.

I installed leiningen using apt-get install leiningen. It worked fine.

Now it says that I need a more recent version: "Do a lein upgrade first".

How do I upgrade lein?

Shiloh answered 19/5, 2015 at 9:30 Comment(0)
S
6

Here are steps to upgrade leiningen-1.x to 2.x.

Find where lein is installed and rename it as something else.

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

$ whereis lein
lein: /usr/bin/lein 

$ sudo mv /usr/bin/lein /usr/bin/lein1

Download lein 2.x and put it in your system path.

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

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

Now check your version

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

You can find these instructions on wiki page of leiningen.

Smelter answered 29/4, 2016 at 13:54 Comment(1)
In my optinion it's much more sensibe to setup ~/bin/ and PATH instead of fighting the package-manager. Which is also mentioned in the READMERundgren
B
5

Run lein upgrade in a terminal.

nodebot@nodebox:~$ lein upgrade
The script at /home/nodebot/bin/lein will be upgraded to the latest stable version.
Do you want to continue [Y/n]? 

Upgrading...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   137    0   137    0     0    242      0 --:--:-- --:--:-- --:--:--   242
100 12015  100 12015    0     0  11841      0  0:00:01  0:00:01 --:--:-- 11841
Leiningen is already up-to-date.
Leiningen 2.5.1 on Java 1.8.0_45 Java HotSpot(TM) 64-Bit Server VM
nodebot@nodebox:~$ 
Bertie answered 24/5, 2015 at 0:31 Comment(1)
I get the answer: Upgrades should be done using apt rather than Leiningen itselfShiloh

© 2022 - 2024 — McMap. All rights reserved.