Earlier when installing snort on a CentOS Linux server I ran into a configure error. The error related to the fact that libdnet was not located on the server and while it was installed I did not have the libdnet-devel package installed. Below is the sample output from the configure error, an expandable complete output of the configure error, and the yum command to install libdnet-devel to move past this error when installing snort.
Configure Error Configuring snort On CentOS Linux:
- checking for dumbnet.h... no
- ERROR! dnet header not found, go get it from
- http://code.google.com/p/libdnet/ or use the --with-dnet-*
- options, if you have it installed in an unusual place
- [root@dev ~]# ./configure --with-mysql --enable-dynamicplugin
- configure: WARNING: unrecognized options: --with-mysql
- 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... gawk
- 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 whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- checking for suffix of executables...
- checking whether we are cross compiling... no
- 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... gcc3
- checking for gcc option to accept ISO C99... -std=gnu99
- checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
- 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) gcc3
- checking build system type... x86_64-unknown-linux-gnu
- checking host system type... x86_64-unknown-linux-gnu
- checking how to print strings... printf
- 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 fgrep... /bin/grep -F
- checking for ld used by gcc... /usr/bin/ld
- checking if the linker (/usr/bin/ld) is GNU ld... yes
- checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
- checking the name lister (/usr/bin/nm -B) interface... BSD nm
- checking whether ln -s works... yes
- checking the maximum length of command line arguments... 98304
- checking whether the shell understands some XSI constructs... yes
- checking whether the shell understands "+="... yes
- checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
- checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
- checking for /usr/bin/ld option to reload object files... -r
- checking for objdump... objdump
- checking how to recognize dependent libraries... pass_all
- checking for dlltool... no
- checking how to associate runtime and link libraries... printf %s\n
- checking for ar... ar
- checking for archiver @FILE support... @
- checking for strip... strip
- checking for ranlib... ranlib
- checking command to parse /usr/bin/nm -B output from gcc object... ok
- checking for sysroot... no
- checking for mt... no
- checking if : is a manifest tool... no
- 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 for dlfcn.h... yes
- checking for objdir... .libs
- checking if gcc supports -fno-rtti -fno-exceptions... no
- checking for gcc option to produce PIC... -fPIC -DPIC
- checking if gcc PIC flag -fPIC -DPIC works... yes
- checking if gcc static flag -static works... yes
- checking if gcc supports -c -o file.o... yes
- checking if gcc supports -c -o file.o... (cached) yes
- checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) 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
- checking for ranlib... (cached) ranlib
- checking whether byte ordering is bigendian... no
- checking for inline... inline
- checking for stdbool.h that conforms to C99... yes
- checking for _Bool... yes
- checking for bison... bison
- checking for flex... flex
- checking for inttypes.h... (cached) yes
- checking math.h usability... yes
- checking math.h presence... yes
- checking for math.h... yes
- checking paths.h usability... yes
- checking paths.h presence... yes
- checking for paths.h... yes
- checking for stdlib.h... (cached) yes
- checking for string.h... (cached) yes
- checking for strings.h... (cached) yes
- checking for unistd.h... (cached) yes
- checking wchar.h usability... yes
- checking wchar.h presence... yes
- checking for wchar.h... yes
- checking sys/sockio.h usability... no
- checking sys/sockio.h presence... no
- checking for sys/sockio.h... no
- checking for floor in -lm... yes
- checking for ceil in -lm... yes
- checking uuid/uuid.h usability... no
- checking uuid/uuid.h presence... no
- checking for uuid/uuid.h... no
- 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 sigaction... yes
- checking for strlcpy... no
- checking for strlcat... no
- checking for strerror... yes
- checking for vswprintf... yes
- checking for wprintf... yes
- checking for memrchr... yes
- checking for inet_ntop... yes
- checking for snprintf... yes
- checking size of char... 1
- checking size of short... 2
- checking size of int... 4
- checking size of long int... 8
- checking size of long long int... 8
- checking size of unsigned int... 4
- checking size of unsigned long int... 8
- checking size of unsigned long long int... 8
- checking for u_int8_t... yes
- checking for u_int16_t... yes
- checking for u_int32_t... yes
- checking for u_int64_t... yes
- checking for uint8_t... yes
- checking for uint16_t... yes
- checking for uint32_t... yes
- checking for uint64_t... yes
- checking for int8_t... yes
- checking for int16_t... yes
- checking for int32_t... yes
- checking for int64_t... yes
- checking for boolean... no
- checking for INADDR_NONE... yes
- checking for __FUNCTION__... yes
- checking for pcap_datalink in -lpcap... yes
- checking for pcap_lex_destroy... no
- checking for pcap_lib_version... 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 dnet.h usability... no
- checking dnet.h presence... no
- checking for dnet.h... no
- checking dumbnet.h usability... no
- checking dumbnet.h presence... no
- checking for dumbnet.h... no
- ERROR! dnet header not found, go get it from
- http://code.google.com/p/libdnet/ or use the --with-dnet-*
- options, if you have it installed in an unusual place
- [root@dev ~]#
To resolve the above error you need to install libdnet-devel using yum on CentOS Linux or something like apt-get on Ubuntu Linux.
Install libdnet-devel On CentOS Linux:
- [root@dev ~]# yum -y install libdnet-devel
- Excluding Packages from none
- Finished
- Setting up Install Process
- Resolving Dependencies
- --> Running transaction check
- ---> Package libdnet-devel.i386 0:1.12-6.el5 set to be updated
- ---> Package libdnet-devel.x86_64 0:1.12-6.el5 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- =====================================================================================================================
- Package Arch Version Repository Size
- =====================================================================================================================
- Installing:
- libdnet-devel i386 1.12-6.el5 epel 48 k
- libdnet-devel x86_64 1.12-6.el5 epel 51 k
- Transaction Summary
- =====================================================================================================================
- Install 2 Package(s)
- Upgrade 0 Package(s)
- Total download size: 99 k
- Downloading Packages:
- (1/2): libdnet-devel-1.12-6.el5.i386.rpm | 48 kB 00:00
- (2/2): libdnet-devel-1.12-6.el5.x86_64.rpm | 51 kB 00:00
- ---------------------------------------------------------------------------------------------------------------------
- Total 166 kB/s | 99 kB 00:00
- Running rpm_check_debug
- Running Transaction Test
- Finished Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Installing : libdnet-devel 1/2
- Installing : libdnet-devel 2/2
- Installed:
- libdnet-devel.i386 0:1.12-6.el5 libdnet-devel.x86_64 0:1.12-6.el5
- Complete!
- [root@dev ~]#
You should now be able to move past the snort configure error and proceed to compiling snort on CentOS Linux.
Click here for more information on Snort or click here for more CentOS articles.