You can, as a Linux user, use the make command to compile utilities, and install them using the command line. But sometimes, the system throws the error “make: command not found” while users try to build a package using make.
By the end, you will have a brief understanding of how to fix the “make: command not found” error in Linux.
Fix the “make: command not found” Error
While make is one of the standard Linux packages that come preinstalled in most Linux distros, sometimes it isn’t available on a system. In this case, whenever the user tries to build a package using make, the system throws the command not found error.
Before fixing the error, first, you need to verify if make is installed on your system. To do so, use the ls function to check the content of the /usr/bin/make directory:
Further on, check if you are able to execute the command with its absolute path:
The aforementioned command will display the version of make installed on your system.
If the above methods don’t work and display an error, then your system doesn’t have make installed. In such situations, installing the make command solves the problem.
But first, update your system’s repository list using APT:
Output:
Then, install the make command:
Output:
If the aforementioned commands don’t work, you can install make by downloading the build-essential package, as follows:
Output:
The build-essential package consists of all the necessary packages related to package building and compilation. The make command is a part of these packages.
Troubleshooting Errors in Linux
The make command is an essential compiler tool in Linux. The errors provided by the system are usually self-descriptive, and experienced users can figure out the solution by looking at the error statement.
In addition to local workstations, Linux-based servers also throw such errors. You can fix most issues by performing a basic audit on the server.