JoeTidee
JoeTidee

Reputation: 26124

How do I check if 'make' is installed on Ubuntu 14.10?

How do I check if 'make' is installed on Ubuntu?

I have tried just typing 'make' on the command line but just get the following message:

The program 'make' can be found in the following packages:
 * make
 * make-guile
Ask your administrator to install one of them

Upvotes: 0

Views: 12596

Answers (1)

W.Prins
W.Prins

Reputation: 1316

Normally just trying the command as you've done is a good enough test to see whether the command is properly installed and is locatable via your PATH. The message implies it is not installed.

All else being equal, you should therefore just go follow the hint and install it with:

sudo apt-get install make

However, if you're not the system administrator, and/or you want to make completely sure it's not perhaps installed but just inaccessible due to (perhaps) a misconfigured PATH (for example), then you can do a system wide search for it. Again there are several ways to do this. Here's one:

find / -iname "make" 2>/dev/null

What this does is search the entire system (from the root folder /) for a file named "make" on a case insensitive basis (the "i" in iname indicates case insensitivity), and all errors are redirected to "/dev/null" -- this basically ignores them. The reason this is done is because find will get access denied errors on multiple folders which we don't care about (such as under /proc/*). Nevertheless we want it to search everywhere it can.

Doing this will list all locations you have access to with files which might be make. But as mentioned before, normally make on ubuntu should however be installed (as usual) under /usr/bin, e.g. as /usr/bin/make.

If you do locate a copy of make and want to go run it, then you can either type the full path to the command to execute it or "ch" to the containing folder first, and then run with:

./make <fill in command line arguments, e.g.--help>

Obviously the proper fix however in this situation would be to go add the location of make to your environment PATH. I'll leave that as an excercise to the reader. :)

Upvotes: 3

Related Questions