When I execute the command sudo make I get this error:

No targets specified and no makefile found.  Stop.

3 Answers 3


make looks for a file called makefile or Makefile in the current working directory. If it does not find one, it says:

No targets specified and no makefile found.

You can specific a file with -f, although it actually sounds like you have no idea what you are doing, so maybe you should ask for more specific details.


There is no file called Makefile in your current directory. Either switch to the correct directory or specify the differently named makefile by passing the -f parameter to make, e.g. make -f MyMakefile.


It is a very bad idea to build stuff (i.e., run make) as root. Do your building as a regular user, and only install as root.

The typical dance goes:


If the previous went well, then you do

sudo make install

But as goldilocks says, you'd better ask with specifics: What package is this? Is it available already for your distribution? If yes, what is wrong with that one? (No, "I saw a message on <random site> saying the version of my distribution is insecure!!!" doesn't cut it; if your distribution is managed halfways competently, they will have patched the problem already.) If not, perhaps they have their reasons not to include it... Is the functionality avaliable in some other way?

If you aren't experienced, and don't know what you are doing, you are in no position to asess the risks, and recover from any mishap. Installing random pieces of software on your system might destroy it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .