ninja command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
ninja: command not found
or when using sudo you get the following error message
sudo: ninja: command not found
Solutions to ninja: command not found
How To Fix ninja: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu ninja is provided by ninja-build package.
ninja-build is:
Ninja is yet another build system. It takes as input the interdependencies of files (typically source code and output executables) and orchestrates building them, quickly.
Ninja joins a sea of other build systems. Its distinguishing goal is to be fast. It is born from the Chromium browser project, which has over 30,000 source files and whose other build systems can take ten seconds to start building after changing one file. Ninja is under a second.
To fix this problem, we can install more using the command below.
sudo apt-get -y install ninja-build
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install ninja-build.
sudo apt -y install ninja-build
Or if you have aptitude installed you can use the following command.
sudo aptitude install ninja-build
Summary
In this tutorial we learn how to fix ninja command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.