Looking For Anything Specific?

How to Fix the "make: command not found" Error in Ubuntu

The make command is probably one of the most widely used commands in the Linux ecosystem. This command is used to build and compile programs directly from the source code.

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:

ls /usr/bin/make

Further on, check if you are able to execute the command with its absolute path:

/usr/bin/make --version

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:

sudo apt-get update

Output:

Then, install the make command:

sudo apt-get install -y make

Output:

If the aforementioned commands don't work, you can install make by downloading the build-essential package, as follows:

sudo apt install build-essential

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.

Related: Why You Should Update Linux Package Repositories Before Installing New Software

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.


Post a Comment

0 Comments