GnuTLS Libnettle 3.4 was not found

13.1k Views Asked by At

When I try to configure GnuTLS I'm getting the error that Libnettle 3.4 was not found. I've nettle 3.4.1-1 installed and the library files are present in /usr/lib. Even when I specify the environment variable NETTLE_LIBS directly (export NETTLE_LIBS="-L/usr/lib -R/usr/lib -lnettle") it always throws out that message.

In the config.log is following more concrete message:

Package dependency requirement 'nettle >= 3.4.1' could not be satisfied.
Package 'nettle' has version '3.4', required version is '>= 3.4.1'

What I'am missing here?

5

There are 5 best solutions below

2
On

when you install nettle, try to specify the install path to /usr/, otherwise it will use the default /usr/local/.

./configure --prefix=/usr/ && make && make install

gnutls will search dependent in /usr/.

2
On

gnutls requires PKG_CONFIG to include nettle.pc and hogweed.pc, which were not copied to /usr/lib/pkgconfig/ in my build of nettle3 on Linux Ubuntu 20.04 x64, so I had to configure gnutls3 as follows:

PKG_CONFIG_PATH="$NETTLE3_ROOT:$PKG_CONFIG_PATH" ./configure --with-included-libtasn1 --with-included-unistring

where NETTLE3_ROOT is the path of nettle3 sources.

0
On

This package worked for me:

sudo apt-get install nettle-dev
0
On

On my system I had to do the following:

  • Install the pkg-config utility, which was missing on my system
  • Configure the environment variable PKG_CONFIG_PATH to include the pkgconfig directory under the prefix where libnettle was installed
  • Configure the libnettle installation using the following configure flags: ./configure --disable-openssl --enable-shared --enable-mini-gmp (the --enable-mini-gmp flag causes libhogweed to be built)
0
On

For ARM64 architecture:

Download nettle 3.6 source package.

cd nettle-3.6
./configure --prefix=/usr/local/
sudo make
sudo make install
cd gnutls-3.7.9
./configure --with--included-libtasn1 --with-included-unistring -without-p11-kit
make
sudo make install