I like Lispy languages. One I’ve been playing with – and occasionally been using for smaller projects – is Clojure. Clojure projects usually use Leiningen for their build system. There are generally two ways to install leiningen – just download the script as per the Leiningen web site, or use the OS package manager. I usually prefer using the OS package manager, but Manjaro doesn’t include leiningen as a package in its repositories. Installing leiningen is pretty easy via the package manager and I’ll show you how.

However, Manjaro Linux is based on Arch Linux, and Arch Linux does include a leiningen package in the AUR. Installing and updating leiningen on Manjaro is almost as easy as using the built-in package manager. You do need to have Pamac installed to access the AUR – the Manjaro Wiki has more information. I use the XFCE-based Manjaro distribution so Pamac is installed by default. The Gnome Manjaro also uses Pamac, but if you use the KDE based flavour you’ll have to install Pamac first as KDE Manjaro uses octopi instead.

The following assumes that you have the basic prerequisites like a supported JDK installed already and just need leiningen itself. I’m using the OpenJDK 8 package from Manjaro, but any supported OpenJDK or other JDK flavour should work fine.

Assuming you have Pamac installed, installing leinigen is as easy as pamac build leiningen. Note that pamac will complain when run as root and will sudo as required. You can also use the Pamac GUI to install the package – the instruction are in the wiki page linked above. I generally prefer to use the command line for tasks like this, so that is how I’ll show you how to install leiningen.

Once pamac is running, answer the first question (“edit build file”) with No. Answer the second one (“commit transaction”) with yes, and you should see output like this:


Preparing...
Cloning leiningen build files...
Checking leiningen dependencies...
To build (1):
leiningen 2.9.1-1 AUR

Edit build files ? [y/N]

Commit transaction ? [y/N] y

==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required
Authenticating as: Timo Geusch (timo) Password:
==== AUTHENTICATION COMPLETE ====

Building leiningen...
==> Making package: leiningen 2.9.1-1 (Sun 05 May 2019 07:19:36 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading 2.9.1.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   128    0   128    0     0    503      0 --:--:-- --:--:-- --:--:--   503
100  717k    0  717k    0     0  1199k      0 --:--:-- --:--:-- --:--:-- 1199k
  -> Downloading leiningen-2.9.1-standalone.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   618    0   618    0     0   4510      0 --:--:-- --:--:-- --:--:--  4478
100 13.9M  100 13.9M    0     0  15.1M      0 --:--:-- --:--:-- --:--:-- 15.1M
==> Validating source files with sha256sums...
    2.9.1.tar.gz ... Passed
    leiningen-2.9.1-standalone.zip ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting 2.9.1.tar.gz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "leiningen"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: leiningen 2.9.1-1 (Sun 05 May 2019 07:19:43 AM PDT)
==> Cleaning up...

Resolving dependencies...
Checking inter-conflicts...


Checking keyring...                                                        [1/1]
Checking integrity...                                                      [1/1]
Loading packages files...                                                  [1/1]
Checking file conflicts...                                                 [1/1]
Checking available disk space...                                           [1/1]
Installing leiningen (2.9.1-1)...                                          [1/1]
Transaction successfully finished.

Once complete, a which lein should give you this kind of output:


[timo@timo-manjaro ~]$ which lein
/usr/bin/lein

Congratulations, you just successfully installed leiningen on Manjaro Linux.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.