Categories: Ubuntu

Solved: “Snort ERROR! dnet header not found”

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.

 

Sponsored
Solved: “Snort ERROR! dnet header not found”

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

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.

Sponsored
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.

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.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago