C stdio.h no such file or directory
71,685
Solution 1
Run:
sudo apt install --reinstall gcc-5.4
This reinstalls gcc
. Reinstalling sometimes fixes problems.
Solution 2
First run:
find /usr/include/ -name "stdio.h"
If no files are returned, run:
sudo apt install --reinstall build-essential
That will reinstall any missing files.
Solution 3
Install missing library:
sudo apt install libc6-dev
Related videos on Youtube
Author by
Camden
i write code for the fun of it and try to figure out different programs every day.
Updated on September 18, 2022Comments
-
Camden over 1 year
gcc
worked perfectly fine until I updated to Ubuntu 16.04 and now when I run:gcc file.c
an error shows up:
file.c:1:18: fatal error: stdio.h: No such file or directory compilation terminated.
I checked if
stdio.h
was there and it still was in/usr/include/stdio.h
. Please help! -
Vikram Hosakote almost 5 years
sudo apt install --reinstall build-essential
fixed the error for me, thanks! -
masarapmabuhay almost 4 yearsI added "-get" after "apt" to be "sudo apt-get install --reinstall build-essential", so that the computer executes the command successfully. Thank you. Peace.
-
Jing He over 2 yearssorry, how to change C/C++ Configurations?
-
BeastOfCaerbannog about 2 yearsHi! Thanks for your answer! Could you also please add a couple of screenshots to make it easier for users to find and apply this setting?