Make Command Not Found? Here’s How to Fix it

The other day I was trying to compile a program on a fresh new Ubuntu system and it threw me an error when I tried to use the make command:

The program 'make' is currently not installed. You can install it by typing:
sudo apt install make

This is an indication that the make command is not installed. You may install make on Ubuntu using these commands one by one:

sudo apt update
sudo apt install make

The first command updates the local package cache. It is necessary specially if it is a freshly installed Ubuntu system. With the refreshed package cache, your system would know about the repository from where make package should be downloaded.

And verify that make has been properly installed:

make --version
check make version linux
Checking make version

A better way to install make on Ubuntu

An even better way to install make command is to use the build essential package. This package contains make, gcc, g++ and several other compilers and developer tools.

sudo apt install build-essential
install build essentials
Installing Build Essential package

With this build-essential package installed, you can easily run C/C++ programs in Linux.

What if make is installed but it doesn’t work

In some rare cases, it may happen that make is installed and yet it doesn’t work.

The reason is that make command is not in the $PATH variable. You can either reinstall make with this command:

sudo apt install --reinstall make

If that doesn’t work, you may try to manually add the binary to your PATH but it shouldn’t come to this manual effort.

I hope this quick tip helped you. Still have the problem or question on the related topic? Feel free to use the comment section. I’ll try to help you in my capacity. If you want an even more rapid response, you may join It’s FOSS Community forum. Enjoy 🙂

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.