0

enter image description hereI'm using VS Code online version provided by CS50, if I'm not wrong.

When I try to compile my code before running it via "make hello" I get this error: "bash: make: command not found."

I verified using "ls /usr/bin/make" and "ls /usr/bin" and it seems that I don't have it installed.

Your help would be much appreciated.

@CNichita ➜ /workspaces/84089815/hello (main ✗) $ ls hello.c @CNichita ➜ /workspaces/84089815/hello (main ✗) $ make hello bash: make: command not found @CNichita ➜ /workspaces/84089815/hello (main ✗) $

2 Answers 2

0

Looks like you made some changes. Maybe you loaded a dotfiles repository from somewhere. In any case you've likely overwritten the PATH setting.

You can try running /opt/cs50/bin/update50 and see if that fixes anything.

3
  • Unfortunately, that doesn't work either: bash: /opt/cs50/bin/update50: No such file or directory
    – Nik
    Commented Jan 15, 2022 at 6:34
  • @Nik The only suggestion I have is to delete the codespace, which you can do from your github page github.com/codespaces and then create a new one. Sorry I couldn't be of more help. Commented Jan 15, 2022 at 9:34
  • That worked, all good now. Thanks a lot.
    – Nik
    Commented Jan 15, 2022 at 10:11
0

Ok, I had the same problem too and this is how you solve it. Once in VSCode, use Cmd or Control + Shift + P, which gives you the command palette. Once there, search "Add Dev Container" and click on the first option that pops up. On the left side, where you can see all you files, you will be able to see a .devcontainer.json file. Now, if this file doesn't have the right things, CS50 will not be connected. Enter the .devcontainer.json file, and copy code from: https://github.com/settings/repositories > click on the code50 part, and once in that repository, copy all the code in the json file called ".devcontainer.json". Then it will automatically prompt you to rebuild / refresh, and then your problem will be solved. Also, use update50 just to make 100% sure that everything is up to date.

You must log in to answer this question.

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