0

I'm trying to compile https://github.com/betolj/ndpi-netfilter on Debian Buster 10.6.

In short I get this error:

make[2]: *** /lib/modules/4.19.0-11-cloud-amd64/build: No such file or directory.  Stop.

These are the steps I have done:

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

And I get this error:

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

What am I missing, please?

1
  • Ah I love it, someone just down votes, without a comment. Very helpful.
    – Houman
    Sep 29 '20 at 18:35
2

You need to install the kernel headers (which include the module build infrastructure):

sudo apt install linux-headers-$(uname -r)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.