user3245689
user3245689

Reputation: 157

bash - make command not found

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

Upvotes: 11

Views: 68927

Answers (4)

tonysok
tonysok

Reputation: 657

In CentOS or Red Hat, try this:

yum groupinstall "Development Tools"

Upvotes: 8

techkuz
techkuz

Reputation: 3956

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

Upvotes: 1

Rahul R Dhobi
Rahul R Dhobi

Reputation: 5806

Please execute following command to install make in your system

sudo yum install build-essential

Upvotes: 20

Pradheep
Pradheep

Reputation: 3819

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.

Upvotes: 1

Related Questions