I just found out that the <stdlib.h>
and <stdio.h>
headers are located in the /usr/include
folder in Ubuntu server, but I don't find sys/types.h
.
And I start to suspect the compiler won't actually use the header file in the /usr/include
folder.
Is this true, and where is the file located?
The file
sys/types.h
is located at the/usr/include/sys/types.h
if u get this kind of Fatal Error:
Fix by using the following code:
Just for future reference, I ran into this problem on my debian machine, and it turned out that in my case
libc6-dev-i386 is the package I seemingly need to install
My Debian box (and hopefully Ubuntu haven't butchered it too much in their zeal) has it in
/usr/include/sys/types.h
.Your best bet is to first execute:
then:
if you don't find it in the first one.
However, keep in mind that the development stuff may not even be installed. I would imaging a server box is meant to be used as a server and it wouldn't surprise me if the compiler and a bunch of other stuff was not part of the default install (but it would have a lot of server things like
ftpd
orApache
and so on).If the compiler is locating it somewhere and you just don't know where, you can use something like:
to find out where it's getting it from.
Or:
for the other header you're worried about.
The final
grep
just strips out the unimportant lines.On Linux,
types.h
should be in/usr/include/sys/types.h
.If you have locate command available you can simply use
locate
:It's the quickest and simplest way to do it.