How to Solve Make Command Not Found Error in Linux Bash

Yahya Irmak Mar 14, 2025 Bash Bash Error
  1. Understanding the make Command
  2. Installing Make on Ubuntu/Debian
  3. Installing Make on CentOS/RHEL
  4. Adding Make to Your PATH
  5. Conclusion
  6. FAQ
How to Solve Make Command Not Found Error in Linux Bash

When you’re working in Linux, you might encounter the frustrating “make command not found” error while trying to compile software from source. This error can halt your progress, especially if you’re eager to build and run your application. The make utility is essential for managing build processes, and without it, you might feel stuck. Fortunately, resolving this issue is usually straightforward.

In this article, we’ll walk you through effective methods to fix the “make command not found” error in Linux Bash, ensuring you can get back to your coding tasks without unnecessary delays.

Understanding the make Command

Before diving into solutions, it’s important to understand what the make command does. The make utility automates the process of building and managing dependencies in software projects. It reads a file called Makefile, which contains rules and instructions for compiling code. When you encounter the “command not found” error, it usually means that make is not installed on your system or it’s not in your PATH.

Installing Make on Ubuntu/Debian

If you’re using a Debian-based distribution like Ubuntu, installing the make command is quite simple. You can use the package manager apt to install it. Here’s how:

sudo apt update
sudo apt install build-essential

Output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gcc g++ libc6-dev make
The following NEW packages will be installed:
  build-essential
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,528 kB of archives.
After this operation, 9,904 kB of additional disk space will be used.

This command updates your package list and installs the build-essential package, which includes make along with other essential tools like gcc and g++. After installation, you can verify whether make is successfully installed by typing:

make --version

Output:

GNU Make 4.2.1
Built for x86_64-pc-linux-gnu

This output indicates that make is now installed and ready for use. If you see the version number, you’ve successfully resolved the error.

Installing Make on CentOS/RHEL

For users on CentOS or Red Hat Enterprise Linux (RHEL), the process is slightly different. You’ll use the yum package manager to install make. Here’s how you can do it:

sudo yum groupinstall "Development Tools"

Output:

Dependencies Resolved
================================================================================
 Package            Arch         Version                     Repository      Size
Installing:
 make               x86_64       1:4.2.1-10.el7              base           1.1 M
...

This command installs a group of development tools, including make, gcc, and other necessary utilities. After the installation is complete, you can confirm that make is installed by running:

make --version

Output:

GNU Make 4.2.1
Built for x86_64-redhat-linux-gnu

Seeing the version number means you’ve successfully installed make, allowing you to compile your projects without issues.

Adding Make to Your PATH

Sometimes, the make command might be installed, but your system cannot find it due to PATH issues. To check if make is installed but not in your PATH, you can use the which command:

which make

Output:

/usr/bin/make

If the output shows a path, make is installed. If it returns nothing, you may need to add its directory to your PATH. Here’s how you can do that:

  1. Open your .bashrc or .bash_profile file in a text editor:
nano ~/.bashrc
  1. Add the following line at the end of the file:
export PATH=$PATH:/usr/bin
  1. Save the file and exit the editor.
  2. Reload the configuration:
source ~/.bashrc

Output:

(no output)

After reloading, you can verify if the make command is now recognized by typing:

make --version

Output:

GNU Make 4.2.1
Built for x86_64-pc-linux-gnu

If you see the version number, you have successfully added make to your PATH.

Conclusion

Encountering the “make command not found” error in Linux Bash can be a stumbling block for developers. However, with the right knowledge and commands, you can quickly resolve this issue. Whether you’re installing make through a package manager or adjusting your PATH, these solutions will get you back on track. Remember, having the right tools at your disposal is essential for a smooth development experience.

FAQ

  1. What is the make command used for?
    The make command is used to automate the process of building and managing dependencies in software projects.

  2. Why does the make command not found error occur?
    This error occurs when the make utility is not installed on your system or is not included in your system’s PATH.

  3. How can I check if make is installed on my system?
    You can check if make is installed by typing which make or make --version in the terminal.

  4. Can I install make using a different package manager?
    Yes, the installation command may vary based on your Linux distribution. For instance, use apt for Debian-based systems and yum for CentOS/RHEL.

  5. What should I do if I still see the error after installation?
    If the error persists, ensure that the directory where make is installed is included in your system’s PATH.

Enjoying our tutorials? Subscribe to DelftStack on YouTube to support us in creating more high-quality video guides. Subscribe
Author: Yahya Irmak
Yahya Irmak avatar Yahya Irmak avatar

Yahya Irmak has experience in full stack technologies such as Java, Spring Boot, JavaScript, CSS, HTML.

LinkedIn

Related Article - Bash Error