0

I try to code my first C-Programs on a VM on Virtual Box and I do it by a YouTube Tutorial. Now i wanted to code a "Hello World!" program. But the problem is, that it seems that stdio.h doesn't exist on the VM. I did an update but it doesn't helped either.

#include <stdio.h>

Can someone help me with this problem?

first.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |           ^~~~~~~~
compilation terminated.
  • do you have a `gcc` installed on your VM? Run `gcc --version` in the command line. – drompix Nov 23 '20 at 13:00
  • 1
    @drompix Considering the error message, it's probably certain that the OP have GCC installed. A better question would be to check if the OP have the common build and development packages installed? Like e.g. the `build-essential` package? – Some programmer dude Nov 23 '20 at 13:04
  • more accurately this header is in the `libc6-dev` package and gcc only Recommends it –  Nov 23 '20 at 13:06
  • @dratenik It should be required in the `build-essential` package. Generally, for Debian-based environments (like e.g. Ubuntu and its derivatives) the base (and first) package to install for all development should really be `build-essential`. – Some programmer dude Nov 23 '20 at 13:10

0 Answers0