`PKG_CHECK_MODULES(LIBMNL, libmnl >= 1.0.0)’ error

If you are installing libnftnl and you have the following error message:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking how to create a pax tar archive... gnutar
checking dependency style of gcc... gcc3
checking whether make supports nested variables... yes
./configure: line 3960: syntax error near unexpected token `LIBMNL,'
./configure: line 3960: `PKG_CHECK_MODULES(LIBMNL, libmnl >= 1.0.0)'

The first step is to chek the version of libmnl is installed in your system:

$ whereis libmnl
libmnl: /usr/local/lib/libmnl.la /usr/local/lib/libmnl.so

$ sudo ldd /usr/local/lib/libmnl.so
linux-vdso.so.1 => (0x00007fffcf5fd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0c2e14b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0c2e6f0000)

I fixed this problem instaling the pkg-config packages. pkg-config is a system for managing library compile and link flags that works with automake and autoconf.

sudo apt-get install pkg-config


Also, It is possible to need the following packages to install nft in your system:

git, make, gcc, bc, libncurses5-dev, autoconf, autotool, libtool, gawk, libjansson-dev, docb, dblatex flex, bison, libgmp-dev, libreadline6-dev

Leave a Reply

Your email address will not be published. Required fields are marked *