我试过
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
我使用的是 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
如何解决这个问题?我应该安装什么?
答案1
您需要安装libnetfilter-queue-dev
.您还需要安装libusb-1.0-0-dev
以解决第二个pkg-config
错误。
如果你安装apt-file
然后运行sudo apt update
,你将能够直接找到这样的包:
apt-file search libnetfilter_queue.pc