Cyberithub

Solved: "Snort ERROR! dnet header not found"

Advertisements

In this article, we will see how to solve snort error dnet header not found. Recently, I was trying to install Snort from source code on my Ubuntu Linux system but as soon as I ran configure script, after sometime it failed with error dnet header not found. After looking into this error for a while, I understood the problem and then I decided to write an article about this to share the solution steps so that in case if you are also facing the same error then it will help you as well.

 

Solved: "Snort ERROR! dnet header not found"

Solved: "Snort ERROR! dnet header not found"

Also Read: How to Install libdnet package on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

As I said, while following the installation steps, when I tried running ./configure script then after sometime I noticed ERROR! dnet header not found on the output as you can see below.

cyberithub@ubuntu:~/snort-2.9.20$ ./configure
...........................................
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

While above error could occur due to multiple reasons but the most obvious one is that it is not able to find dumbnet.h header file due to missing libdumbnet-dev package in your system. So to solve the error, you just to have install this package by using sudo apt-get install libdumbnet-dev command as shown below.

Advertisements
cyberithub@ubuntu:~$ sudo apt-get install libdumbnet-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libdumbnet1
The following NEW packages will be installed:
libdumbnet-dev libdumbnet1
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 81.8 kB of archives.
After this operation, 329 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libdumbnet1 amd64 1.12-9build1 [25.4 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 libdumbnet-dev amd64 1.12-9build1 [56.4 kB]
Fetched 81.8 kB in 1s (74.6 kB/s)
Selecting previously unselected package libdumbnet1:amd64.
(Reading database ... 258457 files and directories currently installed.)
Preparing to unpack .../libdumbnet1_1.12-9build1_amd64.deb ...
Unpacking libdumbnet1:amd64 (1.12-9build1) ...
Selecting previously unselected package libdumbnet-dev.
Preparing to unpack .../libdumbnet-dev_1.12-9build1_amd64.deb ...
Unpacking libdumbnet-dev (1.12-9build1) ...
Setting up libdumbnet1:amd64 (1.12-9build1) ...
Setting up libdumbnet-dev (1.12-9build1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

After installing the package successfully, if you now run ./configure script again then this time you will notice that it is able to find dumbnet.h header file and proceed as expected. This also confirms that the original error dnet header not found is resolved now as evident from below output.

cyberithub@ubuntu:~/snort-2.9.20$ ./configure
.........................................
checking dnet.h usability... no
checking dnet.h presence... no
checking for dnet.h... no
checking dumbnet.h usability... yes
checking dumbnet.h presence... yes
checking for dumbnet.h... yes
..........................................

Sometimes it is also possible that even after following above steps, you might be facing the same error again. In that case, it is quiet possible that you have already installed libdumbnet-dev package in your system but to a different place which is not visible to the system. In that case, I would suggest you to use the --with-dnet-* options with configure script to mention the installation path so that system would able to detect the header file. Hope this will help you solve the error.

Advertisements

Leave a Comment