How I got the latest clojure, java, leiningen versions on ubuntu

From razwiki
Jump to navigation Jump to search

Installing the latest jdk in the ubuntu packages, with the clojure there, with leiningen also from apt, gave a warning every time I invoked leiningen. No good!

Following the clojure installation instructions, it helpfully overwrote itself. Cool! Clojure 1.11.1

'leiningen update' didn't want to self-update since it was installed by a package manager. :( so I uninstalled it from the package manager.

I also had 2 installed java versions, 11 and 17! But the latest is 20. Is it the greatest? idk let me use it and I'll find out...

So I uninstalled java and leiningen. Now clojure doesn't work, ok!

First to install java. I go here https://adoptium.net/

even though the website looks like angular material design I plow ahead... find the downloads page... linux x64 v20 please! download the tar.gz and unzip it.

Now my sysadmin skillz come in to play. Put it in /opt/java: /opt/java/jdk-20+36/

Now I need to set JAVA_HOME and put java on my path.

export JAVA_HOME=/opt/java/jdk-20+36/

in my ~/.profile ok!

Also link $JAVA_HOME/bin/java to /usr/local/bin and do the same for javac. All done, no warnings!

As for lein, its readme has a link to the lein script. So I got that and ran that and it figured itself out ~^_^~