Gcc: fatal error: stdio.h: No such file or directory

Getting on the following error on Ubuntu - Ubuntu 20.04.3 LTS when compiling C programs in Virtual Box

gcc: fatal error: stdio.h: No such file or directory


Yes I have visited all the forums done the sudo apt install / build-essentials etc but unable to fix it. If any one has done the same, can you post the solution. Have already gone through solutions in StackExchange, Ubuntu site but no update yet.```
1 Like

Did you mount the file and compiled it ??

Did you compile exactly as shown in above picture ??
@Devajoy_Choudhury

And all the C programs are saved with .c file extensions
@Devajoy_Choudhury

Thanks for your suggestions. I am aware of what your suggestions. Please read the error note I put there.

1 Like

Try reinstalling GCC and building it again

sudo apt install --reinstall gcc-5.4

sudo apt install --reinstall build-essential