Search code examples
dockermakefilecloud9

Cloud9 C codes running failure


First, I running Cloud9 on Docker (using with linuxserver/cloud9) on Raspbian and installed build-essential on Cloud9

When I tried to run C code (such as printing hello world), it says

Compiling /code/first_c.c ...

cc first_c.c -o first_c

bash: line 6: node: command not found

Process exited with code: 127

Should I install something more? or how can I solve it?


Solution

  • If you just want to run C code, you don't need node, but you have to first install gcc by opening a terminal and running:

    sudo apt update && sudo apt install gcc 
    

    Then check that your runner is C (simple) and that you have uncheck the icon Run in debug mode.

    If you want to run in debug mode you have to install node and gdb with:

    sudo apt install nodejs gdb
    

    == Update ==

    P.S.: When gdb is not installed, C9 shows wrongly :

    "gdbserver" is not installed

    This is a bug: corrected by this (yet) non-merged PR.