X

Fix the “make: command not found” Error in Ubuntu

The Linux make command is used to build and compile applications from source code, as it also builds and compiles source code dependencies using a "makefile".

As a Linux user, you can use the make program to compile utilities and install them from the command line. However, sometimes users receive the error message "make: command not found.".

In this article, you will learn what causes this error and how to solve it using various methods.

Cause of the "make: command not found" Error

The make package is a basic Linux package that usually comes by default in most Linux distributions, but it is not always the case. When that happens, a user's attempt at compilation or building packages results in an error.

To resolve this error, you can install the make package and restore the system's building and compiling capabilities.

Prerequisites

  • Ubuntu or any other Linux-based distribution
  • Terminal access
  • A user account with sudo or root privileges.

Note: Although the commands used in this tutorial are specifically for the Ubuntu system, all the methods are also valid for any other Linux-based system.

Check for make in Your System

First of all, you need to check if you have the make command installed on your system or not. To do so, you need to run the following ls command to see the /usr/bin/make directory.

ls /usr/bin/make

Alternatively, you can also use the command:

which make

to search for make in PATH,

The output shows that the default directory of the make common command does not exist on your system. It means that the make is not present in your system. To further ensure this, run the following command.

/usr/bin/make --version

The above output verifies that your system is missing the make package.

Install make Package

Update Your System

Update your system to make sure that your repositories are up to date.

sudo apt-get update

Install the make Command

Once the system update is completed, run the following apt command to install the make package.

sudo apt install -y make

Once make is installed, run the above list command or your initial command to see if the issue has been resolved.

Install the build-essential Package

If you still encounter some issues, you can then install the build-essential package. If you still encounter some issues, you can then install the build-essential package. build-essential is a meta-package, which means that it installs a list of other packages as dependencies. All of the necessary packages for package building and compilation are included in the build-essential package, so the make package comes by default with the build-essential package.

sudo apt install build-essential

The make command not found error has been fixed now and you can continue compiling your application.

FAQForge Staff:
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings