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

How is Livepatch safeguarded against bad actors?

Canonical Livepatch is a security patching automation tool which supports reboot-less security updates for the…

1 hour ago

Accelerating data science with Apache Spark and GPUs

Apache Spark has always been very well known for distributing computation among multiple nodes using…

1 hour ago

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

1 day ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

1 day ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

1 day ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago