LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-27-2009, 01:44 PM   #1
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Rep: Reputation: 32
Trying to install Snort


Running into an issue when I attempt to install it.

Code:
/usr/local/include/pcap.h:42:21: error: net/bpf.h: No such file or directory
make[3]: *** [sfhashfcn.o] Error 1
make[3]: Leaving directory `/usr/local/snort-2.8.4.1/src/sfutil'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/snort-2.8.4.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/snort-2.8.4.1'
make: *** [all] Error 2
Anyone have any idea how to fix this error? I can see that it appears to be missing the file net/bpf.h but I'm not sure where to get it from.

Forgot to mention this is on CentOS 5.

Last edited by Skillz; 06-27-2009 at 01:49 PM.
 
Old 06-27-2009, 01:54 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Sounds like you might be missing the libpcap development files. Is there a package named something like libpcap-dev in your repositories? If so, install it and see. BTW, I'm moving this to Software, as it's not a security issue.
 
Old 06-27-2009, 01:55 PM   #3
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
How do I check to see if it's in the repositories?
 
Old 06-27-2009, 02:00 PM   #4
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
I did a;

yum install libpcap-devel

It installed, still getting the same error though.
 
Old 06-27-2009, 02:04 PM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
i think its because of libpcap missing, check whether libpcap installed properly or not
 
Old 06-27-2009, 02:05 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Is there a file called bpf.h on your system?

Maybe you're specifying a wrong path during the source code configuration.
 
Old 06-27-2009, 02:05 PM   #7
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
How do I check to see if it's installed properly?

# rpm -qa | grep pcap
libpcap-0.9.4-14.el5
libpcap-devel-0.9.4-14.el5

How do I actually check if it's installed properly though?
 
Old 06-27-2009, 02:07 PM   #8
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by win32sux View Post
Is there a file called bpf.h on your system?

Maybe you're specifying a wrong path during the source code configuration.
How do I search for it?
 
Old 06-27-2009, 02:08 PM   #9
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Skillz View Post
How do I check to see if it's installed properly?
Look here.

Quote:
Originally Posted by Skillz View Post
How do I search for it?
You could do a:
Code:
find / -type f -name bpf.h
 
Old 06-27-2009, 02:14 PM   #10
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
/usr/local/Libnet-1.0.2a/include/bpf.h

Not sure where I would need to move it though.
 
Old 06-27-2009, 02:18 PM   #11
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
copy bpf.h on this following location /usr/include/net/ and check it, (small correction sorry for that) just check this, if there is any file like pcap-bpf.h on this following location /usr/include/pcap-bpf.h, if yes copy this file instead above mentioned (i dont know whether libnet bpf.h and pcap-bpf.h are similar)
cp /usr/include/pcap-bpf.h /usr/include/net/bpf.h

Last edited by kirukan; 06-27-2009 at 02:26 PM.
 
Old 06-27-2009, 02:33 PM   #12
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
I copied the file /usr/local/Libnet-1.0.2a/include/bpf.h to /usr/include/net and it finally made it past that part.

Thanks for that.

Although now I am getting this error:

Code:
decode.c: In function 'DecodeIEEE80211Pkt':
decode.c:357: error: 'PacketCount' has no member named 'wifi_mgmt'
decode.c:367: error: 'PacketCount' has no member named 'wifi_control'
decode.c:375: error: 'PacketCount' has no member named 'wifi_data'
decode.c:381: error: 'PacketCount' has no member named 'wifi_data'
make[3]: *** [decode.o] Error 1
make[3]: Leaving directory `/usr/local/snort-2.8.4.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/snort-2.8.4.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/snort-2.8.4.1'
make: *** [all] Error 2
It appears to be some kind of WiFi type stuff and the server this is getting installed on, doesn't' have wifi anyway.
 
Old 06-27-2009, 02:41 PM   #13
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Let's back up a second. Is your configuration phase completing without errors? Please post your ./configure output if you can. Here's mine, in case it's useful for comparing (I downloaded the Snort tarball and configured/compiled it a couple minutes ago to see if I could reproduce your problem).
Code:
win32sux@candystore:~/Desktop/snort-2.8.4.1$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for ranlib... ranlib
checking for bison... no
checking for yacc... no
checking for flex... no
checking for lex... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking whether byte ordering is bigendian... no
checking for sparc alignment... no
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for inttypes.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking whether printf must be declared... no
checking whether fprintf must be declared... no
checking whether syslog must be declared... no
checking whether puts must be declared... no
checking whether fputs must be declared... no
checking whether fputc must be declared... no
checking whether fopen must be declared... no
checking whether fclose must be declared... no
checking whether fwrite must be declared... no
checking whether fflush must be declared... no
checking whether getopt must be declared... no
checking whether bzero must be declared... no
checking whether bcopy must be declared... no
checking whether memset must be declared... no
checking whether strtol must be declared... no
checking whether strcasecmp must be declared... no
checking whether strncasecmp must be declared... no
checking whether strerror must be declared... no
checking whether perror must be declared... no
checking whether socket must be declared... no
checking whether sendto must be declared... no
checking whether vsnprintf must be declared... no
checking whether snprintf must be declared... no
checking whether strtoul must be declared... no
checking for snprintf... yes
checking for strlcpy... no
checking for strlcat... no
checking for strerror... yes
checking for vswprintf... yes
checking for wprintf... yes
checking for sizeof(unsigned long)... 32 bits
checking for __FUNCTION__... yes
checking for floor in -lm... yes
checking for pcap_datalink in -lpcap... yes
checking for libpcap version >= 0.9... yes
checking for libpcap version 0.9.0 - 0.9.4... no
checking for INADDR_NONE... yes
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking for pcre_compile in -lpcre... yes
checking for libpcre version 6.0 or greater... yes
checking for dlsym in -ldl... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for linuxthreads... no
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/sfutil/Makefile
config.status: creating src/detection-plugins/Makefile
config.status: creating src/dynamic-plugins/Makefile
config.status: creating src/dynamic-plugins/sf_engine/Makefile
config.status: creating src/dynamic-plugins/sf_engine/examples/Makefile
config.status: creating src/dynamic-plugins/sf_preproc_example/Makefile
config.status: creating src/dynamic-preprocessors/Makefile
config.status: creating src/dynamic-preprocessors/libs/Makefile
config.status: creating src/dynamic-preprocessors/ftptelnet/Makefile
config.status: creating src/dynamic-preprocessors/smtp/Makefile
config.status: creating src/dynamic-preprocessors/ssh/Makefile
config.status: creating src/dynamic-preprocessors/dcerpc/Makefile
config.status: creating src/dynamic-preprocessors/dcerpc2/Makefile
config.status: creating src/dynamic-preprocessors/dns/Makefile
config.status: creating src/dynamic-examples/Makefile
config.status: creating src/dynamic-examples/dynamic-preprocessor/Makefile
config.status: creating src/dynamic-examples/dynamic-rule/Makefile
config.status: creating src/dynamic-preprocessors/ssl/Makefile
config.status: creating src/output-plugins/Makefile
config.status: creating src/preprocessors/Makefile
config.status: creating src/preprocessors/HttpInspect/Makefile
config.status: creating src/preprocessors/HttpInspect/include/Makefile
config.status: creating src/preprocessors/HttpInspect/utils/Makefile
config.status: creating src/preprocessors/HttpInspect/anomaly_detection/Makefile
config.status: creating src/preprocessors/HttpInspect/client/Makefile
config.status: creating src/preprocessors/HttpInspect/event_output/Makefile
config.status: creating src/preprocessors/HttpInspect/mode_inspection/Makefile
config.status: creating src/preprocessors/HttpInspect/normalization/Makefile
config.status: creating src/preprocessors/HttpInspect/server/Makefile
config.status: creating src/preprocessors/HttpInspect/session_inspection/Makefile
config.status: creating src/preprocessors/HttpInspect/user_interface/Makefile
config.status: creating src/preprocessors/Stream5/Makefile
config.status: creating src/parser/Makefile
config.status: creating src/target-based/Makefile
config.status: creating doc/Makefile
config.status: creating contrib/Makefile
config.status: creating schemas/Makefile
config.status: creating rpm/Makefile
config.status: creating preproc_rules/Makefile
config.status: creating m4/Makefile
config.status: creating etc/Makefile
config.status: creating templates/Makefile
config.status: creating src/win32/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
 
Old 06-27-2009, 02:47 PM   #14
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
This is the output of ./configure

http://www.redlined.org/config.txt

I was running the command
./configure --enable-targetbased && make && make install

Just following a guide to get it installed, so I was doing what it told me.

edit
I didn't notice anything that stood out as it needed to be fixed with the output of ./configure

Last edited by Skillz; 06-27-2009 at 02:52 PM.
 
Old 06-27-2009, 02:57 PM   #15
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Refer the google i think there are some discussion.
http://www.google.lk/search?hl=en&cl...meta=&aq=f&oq=
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP]SNORT PROBLEMS(IDS)-service snort start JayCool Linux - Software 5 03-15-2009 12:34 PM
install snort 2.8 wajdislama Linux - Software 0 08-27-2008 04:09 AM
snort install kapslock Debian 3 08-23-2004 11:50 AM
How to install snort-which way? james_cwy Linux - Newbie 3 11-13-2003 11:58 PM
how to install SNORT on RH 7.2?? StamfordRob Linux - Newbie 5 03-25-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration