11

I have created make file named Makefile in my linux ec2 server.

all: a b

a: daemon.cpp dictionary_exclude.cpp
        g++ -o a daemon.cpp dictionary_exclude.cpp -lpthread -std=c++0x -L.

b: user_main.cpp client.cpp
        g++ -o b user_main.cpp client.cpp

I could run each of this independently successfull.

But when I execute

make
make -f Makefile

It says make : -bash: make: command not found

Any idea? I can see manually for make is available through man make

2
  • 1
    see stackoverflow.com/questions/9544200/… Commented Feb 11, 2014 at 12:31
  • 1
    man make will give you some documentation about the make command. you can install the documentation without installing make itself, so man make is not a good test to check whether a program is installed. Commented Feb 11, 2014 at 13:43

4 Answers 4

20

Please execute following command to install make in your system

sudo yum install build-essential
Sign up to request clarification or add additional context in comments.

1 Comment

build-essential is for apt-get, the "Development Tools" package is the equivalent under yum
10

In CentOS or Red Hat, try this:

yum groupinstall "Development Tools"

Comments

1

It might be that you have not installed binutils http://en.wikipedia.org/wiki/GNU_Binutils or you have not set your PATH variable to the correct location of bin utils.

1 Comment

make is not part of the binutils package.
1

sudo apt-get install build-essential on Ubuntu 16 worked for me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.