sys/types.h: No such file or directory sys/types.h: No such file or directory linux linux

sys/types.h: No such file or directory


I had a similar error with Linux Mint

fatal error: sys/types.h: No such file or directory

Fixed this problem with:

sudo apt install libc6-dev


I'd suggest looking to see if gcc is looking for header files in the directory where your file is located with the command:

`gcc -print-prog-name=cc1` -v      # for c


Sorry this was my fault, I made a typo in type and tried to include sys/types.h file, but it was not required at all all types are declared in /usr/src/linux-headers-4.5.0-kali1-common/include/linux/types.h in my case. Thanks everyone.