Why Package libnetfilter_queue was not found in the pkg-config search path?

I tried

make all
go build -o bettercap .
go build github.com/chifflier/nfqueue-go/nfqueue:
# pkg-config --cflags  -- libnetfilter_queue
Package libnetfilter_queue was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnetfilter_queue.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libnetfilter_queue' found
pkg-config: exit status 1
go build github.com/google/gousb:
# pkg-config --cflags  -- libusb-1.0
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
pkg-config: exit status 1

I am on Ubuntu 22.04.

apt-cache search libnetfilter_queue
golang-github-chifflier-nfqueue-go-dev - Go bindings for NFQueue
libnetfilter-queue-dev - Development files for libnetfilter-queue1
libnetfilter-queue-doc - Documentation files for libnetfilter-queue1
libnetfilter-queue1 - Netfilter netlink-queue library
ruby-nfqueue - Wrapper around libnetfilter_queue using FFI

How to resolve this?
what should I install?

Asked By: MikiBelavista

||

You need to install libnetfilter-queue-dev. You’ll also need to install libusb-1.0-0-dev to address the second pkg-config error.

If you install apt-file and then run sudo apt update, you’ll be able to find such packages directly:

apt-file search libnetfilter_queue.pc
Answered By: Stephen Kitt
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.