StandardUbuntuinstalls don’t include the Linuxmakeutility.
It’s used mainly by software developers, but even non-coders may need it in some situations.
Here’s how to installmakeon Ubuntu Linux.
Napier Lopez / How-To Geek
That’s normal—Ubuntu doesn’t install themakecommand by default.
The
utility is often used when compiling software from source code on Linux.
To fix the “make: command not found” error, you just need to installmake.
you could do that withapt, Ubuntu’s standard package manager.
What Is the make Utility?
Themaketool is a command-line utility that assists in building software projects.
To appreciate its usefulness, though, you have to understand how software is normally developed.
When programmers write code they pop in their program instructions into aneditoror anintegrated development environment.
Something has to happen to convert the text files into an executable binary.
That step is called compilation, and it requires a program called a compiler.
The compiler reads the source code files, and translates them into low-level instructions that theCPUcan understand.
It generates a binary file containing all of those instructions.
It’s the binary file that gets called and executed when you give a shot to run your program.
Compilers are complicatedpieces of software.
And a complicated development project can have hundreds of different source code files.
That’s a lot of tweaks to have to keep track of.
Another complication is you don’t want to compile files that haven’t changed since they were last compiled.
That’s a waste of time.
It also avoids the recompilation of files that haven’t changed since the previous compile.
The program that reads the makefile and coordinates the building of the project ismake.
The controlled recompilation and build of the project can be carried out by issuing one command:make.
Some integrated development environments use auto-generated makefiles and carry out the compile phase by callingmakein the background.
I’m Not a Programmer, Why Should I Care?
If you’re administering a computer for someone else, it’s worth checking to see whethermakeis already installed.
punch in the make command and hit “Enter.”
you could use thewhereiscommand to see where themakebinary andmanpages are located.
If you see a message from Bash saying it can’t find themakecommand, thenmakeisn’t installed.
We can installmakeeasily with this command.
However, without the default set of development toolsmakeisn’t much use.
So you might as well install them.
Handily, these are bundled into a single package called “build-essential.”
Installing that package installs tools likegccandg++, and it also installsmake.
It kills two birds with one stone.
drop in the “build-essential” package with this command.
It’s worth the small wait though, as they’ll stand you in good stead.
You ought to be able to cope with all kinds of software builds now.
Related:apt vs. apt-get: What’s the Difference on Linux?
What If Bash Still Can’t Find make?
Very rarely,makeis installed but Bash still can’t find it.
To solve this, we might as well try the easy option first.
you’ve got the option to force a reinstall ofmakeusing this command.
If that doesn’t work, you canuse thefindcommandto take a stab at locate themakebinary.
Then we can see to it it is in a directory that isin the$PATHenvironment variable.
This command will search your file system from therootdirectory, looking for a file called “make.”
It pipes the output intoless.
You’ll see all the lines that contain the word “make.”
We’ll move that to where it should be, andmakeshould start to work.
Great, we’ve got make working on this computer.
You will no longer see the “make: command not found” error.
If you could make It Here
you could make it anywhere.
These techniques should work on other distributions, too.
You’ll just need to substitute the installation commands for the ones used in your own distribution.
OnFedorayou can use this command to implement the build tools, along withmake.
OnManjaro, use this command.
Related:How to Install Linux Software in Windows 10’s Ubuntu Bash Shell