我正在尝试编译https://github.com/betolj/ndpi-netfilter在 Debian Buster 10.6 上。
简而言之,我得到这个错误:
make[2]: *** /lib/modules/4.19.0-11-cloud-amd64/build: No such file or directory. Stop.
这些是我已完成的步骤:
apt install libtool libpcap-dev iptables-dev
apt install conntrack libnetfilter-conntrack-dev
cd /home/admin
git clone https://github.com/betolj/ndpi-netfilter
cd ndpi-netfilter
tar -xvzf nDPI.tar.gz
cd nDPI
./autogen.sh
cd ..
NDPI_PATH=/home/admin/ndpi-netfilter/nDPI make
我收到此错误:
make -C ipt
make[1]: Entering directory '/home/admin/ndpi-netfilter/ipt'
if test -d ndpi_cpy; then \
cp /home/admin/ndpi-netfilter/nDPI/src/* ndpi_cpy -R; \
else \
mkdir ndpi_cpy; \
cp /home/admin/ndpi-netfilter/nDPI/src/* ndpi_cpy -R; \
fi
make libxt_ndpi.so
make[2]: Entering directory '/home/admin/ndpi-netfilter/ipt'
make[2]: 'libxt_ndpi.so' is up to date.
make[2]: Leaving directory '/home/admin/ndpi-netfilter/ipt'
rm -r ndpi_cpy
make[1]: Leaving directory '/home/admin/ndpi-netfilter/ipt'
make -C src
make[1]: Entering directory '/home/admin/ndpi-netfilter/src'
if test -d ndpi_cpy; then \
cp /home/admin/ndpi-netfilter/nDPI/src/* ndpi_cpy -R; \
else \
mkdir ndpi_cpy; \
cp /home/admin/ndpi-netfilter/nDPI/src/* ndpi_cpy -R; \
fi
cp ndpi_cpy/../../nDPI-patch/src/* ndpi_cpy/ -R;
cp ndpi_cpy/lib/third_party/src/*.c ndpi_cpy/lib -R;
cp ndpi_cpy/lib/third_party/include/*.h ndpi_cpy/lib -R;
cp ndpi_cpy/lib/third_party/include/*.h ndpi_cpy/include -R;
sed -i "s/^\s*void ndpi_free_flow/\/\/void ndpi_free_flow/" ndpi_cpy/include/ndpi_api.h;
make -C /lib/modules/4.19.0-11-cloud-amd64/build M=$PWD;
make[2]: Entering directory '/home/admin/ndpi-netfilter/src'
make[2]: *** /lib/modules/4.19.0-11-cloud-amd64/build: No such file or directory. Stop.
make[2]: Leaving directory '/home/admin/ndpi-netfilter/src'
make[1]: *** [Makefile:161: all] Error 2
make[1]: Leaving directory '/home/admin/ndpi-netfilter/src'
make: *** [Makefile:6: all] Error 2
请问我缺少什么?
答案1
您需要安装内核头文件(其中包括模块构建基础设施):
sudo apt install linux-headers-$(uname -r)