LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sys/types.h: No such file or directory (https://www.linuxquestions.org/questions/linux-newbie-8/sys-types-h-no-such-file-or-directory-4175537604/)

astralmaster 03-23-2015 09:06 AM

sys/types.h: No such file or directory
 
I am trying to compile a small C program on Slackware 13.37 that uses libpcap libraries. When I do
PHP Code:

gcc app.-lpcap 

it throws error:
PHP Code:

/usr/stuff/app/libpcap/pcap.h:46:25fatal errorsys/types.hNo such file or directory 

If I correctly understand, this has something to do with not having
PHP Code:

kernel-headers 

installed. If so, how can I install kernel-headers on my system? Or am I misunderstanding the problem?

Also, the directory where /sys/types.h is supposed to be located is completely empty - /usr/include/

brianL 03-23-2015 12:57 PM

If you did a full install, as recommended, you should have libpcap and the kernel headers.

veerain 03-23-2015 01:36 PM

Quote:

sys/types.h
This dir/file is provided by kernel headers as well glibc headers. Though they have different locations. And glibc ones may depend on kernel ones.

So install devel files of both glibc and kernel headers.

brianL 03-23-2015 02:12 PM

Quote:

Originally Posted by veerain (Post 5336489)
So install devel files of both glibc and kernel headers.

Slackware doesn't divide libraries into development (dev or devel) and runtime packages.

knudfl 03-23-2015 02:56 PM

Slackware 13.37, glibc-2.13(-<arch>-4.txz) provides :
/usr/include/sys/types.h

$ cat /var/log/packages/glibc-2.13* | grep types.h

veerain 03-23-2015 11:03 PM

Quote:

Originally Posted by brianL (Post 5336526)
Slackware doesn't divide libraries into development (dev or devel) and runtime packages.

OK. Nice for info.


All times are GMT -5. The time now is 04:20 AM.