Error building nftables on Ubuntu Server 16.04.03 LTS

J Doe general at nativemethods.com
Sat Aug 19 22:54:23 UTC 2017


> On Aug 19, 2017, at 4:20 PM, Colin Law <clanlaw at gmail.com> wrote:
> 
>> On 19 August 2017 at 21:03, J Doe <general at nativemethods.com> wrote:
>> Hello,
>> 
>> I am currently attempting to build the nft user land tool from the nftables
>> project [1][2].
>> 
>> On Ubuntu Server 16.04.03 LTS, nft is available via the nftables package,
>> however the version of nft that is installed is version 0.5 whereas the most
>> current version of nft is 0.7.  While version 0.5 is functional, there are
>> some nftables syntax that only the current version of the tool supports.
>> 
>> I am following the instructions on the nftables wiki [3] to build the first
>> library - libnftnl - however, I get an error.
>> 
>> $ sudo apt-get install libgmp-dev libreadline-dev bison flex autoconf gcc
>> $ git clone git://git.netfilter.org/libnftnl
>> $ cd libnftnl
>> $ sh autogen.sh
>> 
>> configure.ac.28: error: possibly undefined macro: AC_DISABLE_STATIC
> 
> Try
> autoreconf -i
> then ./configure
> 
> Alternatively there is the option to install from a ppa such as
> https://launchpad.net/~jgraichen/+archive/ubuntu/nftables
> 
> Colin

Hi Colin,

It turns out I did not have a complete set of build tools.

$ sudo apt-get install bison flex binutils build-essential autoconf libtool pkg-config

Then I install from packages two dependencies that nftables requires.

$ sudo apt-get install libgmp-dev libreadline-dev

Then I proceed with building the libmnl and libnftnl libraries as per the wiki instructions.

Lastly I had to update the path to the libraries

$ LD_LIBRARY_PATH=/usr/local/lib
$ export LD_LIBRARY_PATH

Running nft now shows the correct version.

$ nft -v
nftables v0.7 (Scrooge McDuck)

Thanks for your help,

- J






More information about the ubuntu-users mailing list