I have created very first C program hello world. Its exact copy of the program from 1 week, lecture continued. When I try to make hello in terminal, I got this

error message: make: *** No rule to make target `hello'.  Stop.

How to solve it please?

  • Are you using the cs50 appliance? – Sean DiSanti Jun 18 '14 at 7:52
  • Yes thats it, i run update50 as well, but no help: imgur.com/n055Trp – Tomas Jun 18 '14 at 8:07
  • Good deal, use 'ls' to make sure that you see your hello.c file in the same directory that you're running make from. – Sean DiSanti Jun 18 '14 at 8:08
  • I am not linux user:) tried ls, I see folders etc. But didn't find in gedit where to make a path to dropbox folder or so. – Tomas Jun 18 '14 at 8:14

Take a look at the terminal window, are you inside Dropbox/pset1?

  • Thank you, now I got it, I just had to move to proper folder before running make:) Thanks a lot, have spend nearly 1 hour on this:( – Tomas Jun 18 '14 at 8:21
  • Don't worry, things like that happens from time to time even when you have a certain experience. – supeindesu Jun 18 '14 at 9:24
  • I am also having the same problem.I m in pset1 folder.I m using cs50 IDE.Thanks in advance – Sachin Patil Oct 31 '16 at 17:55

You should first navigate to the directory where hello.c exists then just run make hello!

  • I ran previous programs successfully while remaining in jharvard@appliance(~) but now when write make hello-1, it says no rule to make target 'hello-1'.stop. – Arwa Jun 28 '15 at 13:46
  • @Arwa you should be in the same directory as the .c file before running make on it. – kzidane Jun 28 '15 at 13:59
  • I have two programs in same folder.when I make first one, it is compiled successfully but for second one it says no rule to make target 'hello-1'.stop. If it was directory issue then it should not compile first program as well – Arwa Jun 28 '15 at 14:03
  • also when I write cd dropbox, it says no such directory or file – Arwa Jun 28 '15 at 14:08
  • @Arwa what is the output of executing ls? – kzidane Jun 28 '15 at 14:09

the command/file name combination is case sensitive - make sure you have named your file "hello" rather than "Hello". If it's capitalised, try "make Hello"


This was great to find, also had to adjust so that directory read: jharvard@appliance (~/Dropbox/pset1): instead of jharvard@appliance (~): by "cd" in latter


If any of these solutions above have not solved your problems, here's another solution:

the word after command "make" should be the same as the file name. example: File name:hello.c Command should be written: make hello


Other way which helped me is typing: cd (you will moved into default directory). Then type ls and hope you'll see your file there.

You must log in to answer this question.

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