Install newer ninja-build (1.8.2) on Ubuntu 14.04 Trusty

Written by - 1 comments

Published on December 22nd 2017 - Listed in Linux


The developer tool ninja-build can be installed from the official Ubuntu repositories. If you have installed the ninja-build package, you can see it's in version 1.3.4:

/usr/bin/ninja --version
1.3.4

But sometimes developers require (or want) a newer version. With ninja-build that's very easy to do because pre-compiled binaries are ready to download and use.

In this case I installed the current version of ninja-build 1.8.2 on an Ubuntu 14.04 Trusty machine.

Download the current release:

wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip

This file contains the ninja binary. I unzipped it into /usr/local/bin:

sudo unzip ninja-linux.zip -d /usr/local/bin/

Tell Ubuntu to use this new path for the "ninja" command:

sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
update-alternatives: using /usr/local/bin/ninja to provide /usr/bin/ninja (ninja) in auto mode

Test version output:

/usr/bin/ninja --version
1.8.2

No need to compile from source in this case. Quick and efficient.


Add a comment

Show form to leave a comment

Comments (newest first)

Frustrated Ubuntu User from wrote on Jan 9th, 2018:

Thanks, this has saved my ass