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?

Alex Miller
  • 69,183
  • 25
  • 122
  • 167

2 Answers2

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.

Chillar Anand
  • 27,936
  • 9
  • 119
  • 136
  • 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 [README](https://github.com/technomancy/leiningen#installation) – birdspider Aug 10 '16 at 16:41
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:~$ 
user12205
  • 2,684
  • 1
  • 20
  • 40