컴파일하려고하는데https://github.com/betolj/ndpi-netfilter데비안 버스터 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)