sys/types.h: No such file or directory

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.


You can fix this problem with:

sudo apt-get install libc6-dev-i386

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