How to Fix make Command Not Found Error on Ubuntu

The Make Command Not Found error on Ubuntu is a really annoying issue, but the good news is that it’s easy to fix. Read this article, and you’ll learn how to get it working again in no time.

When I say make command, it’s one of those command-line utilities that almost every Linux user occasionally use. “Make” is a command that offers users a pathway to seamlessly download several polished developer tools on their system. 

Apart from that, it significantly aids users in compiling or even building entire programs. It is done through the source code. If you haven’t guessed it already, the make command helps build all those dependencies like the ones you might be using today. 

Reasons Behind make Not Found on Ubuntu Issue

The most straightforward answer to this problem is pretty basic—your system lacks the make utility. It might be unfamiliar for some, but the unavailability of the make fuction is not that unusual. However, that’s is not the only reason. There are instances when you need to have the make command installed but still, due to some bugs, it won’t operate.

reason behind make command not found issue

Whatever the reason is, the important part is getting it fixed. In the following tutorial, you’ll learn that.

Pre Requisites

Before I guide you on how to fix the Make Command Not Found on Ubuntu, you need to learn about the requisites. So, it is crucial to ensure you have access to the following:

  • An Ubuntu system (or the Linux-based ones). Although the tutorial focuses primarily on the Ubuntu-based system, the steps can be adapted to other distros as well.
  • Access to the command line utility (Terminal)
  • Sudo privileges or root privileges

How to Fix the make Command Not Found on Ubuntu

If you’re done having all the prerequisites sorted out, now you can proceed to address and resolve the make command not found issue on Ubuntu.

Step 1: Checking for the make Command Utility

Although the make command is available in the Linux packages by default in most cases, that’s not always the scenario for everyone. It is always crucial to verify whether the make command is already installed on your system or not.

The process is simple, all you need to do is launch the Terminal using the “Ctrl+Alt+T” command and invoke the ls command together with the /usr/bin/make option. After that, study the output.

how to check make command on ubuntu
You'll probably see a message that says "cannot access /usr/bin/make; No such file or directory."

Alternatively, you can also use the --version flag together with /usr/bin/make and verify the absence of the make command utility. 

Step 2: Install the make Package

Now that you know the absence of the make command is what’s causing the issue, head over and get the utility installed. 

Update the System Repository

As usual, ensure your system is updated. For that, invoke the apt update command in the following manner:

$ sudo apt-get update
update the system repository

Proceed with the Installation

When the update process is done, use the following command and install the make utility.

Input:

$ sudo apt-get install -y make
install make command

Verification

Wait for the installation to complete. After that, employ the ls /usr/bin/make command and check if the process was successful. At this point, you should not come across the message “cannot access /usr/bin/make; No such file or directory.” In case you do, repeat the process.

verify make command

Step 3: Get the Build-Essential Package Installed

The next task is installing the build-essential package. Although it is optional, doing so will ensure you don’t encounter unwanted issues. With the build-essential package, you’re looking at a meta-package that comprises some other crucial packages in the form of dependencies. These play a pivotal role in ensuring an optimized system operation.

Installing the Build-Essential package on your system is no big deal and will hardly take a few minutes of your time. Simply get yourself inside the Terminal and invoke the following command:

$ apt install build-essential
install build essentials

Step 4: Restart Your System

Finally, perform a quick reboot. This is to ensure that all the changes were successfully made.

If you’ve made it this far, then most probably, the make command error in your Ubuntu system has been fixed. But if in case you’re still stuck with the same issue, try doing the following method below.

Try the reinstall Command

When you find yourself struggling with the make command not working on Ubuntu even after attempting the fixes we provided, your last resort is to invoke the reinstall command. 

Keep in mind that as the make command is not a part of the $PATH variable by default, it might fail to operate at times. Reinstalling can help add the concerned binary to the $PATH variable.

Input:

$ sudo apt install --reinstall make

This marks the end of this article, and that’s basically all you need to know to fix the Make Command Not Found error on Ubuntu. As it is pretty much clear from the tutorial, resolving the trouble isn’t a challenging task. However, you need to be aware of and adopt the most appropriate approach.

If this guide helped you, please share it.

Leave a Reply
Related Posts