10

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?

DevJoe
  • 143
  • 1
  • 1
  • 5
  • What architecture do you have? Are you trying to cross-compile GnuTLS? – JCMiguel Feb 19 '19 at 12:39
  • 2
    It is almost two months ago, but I think I have solved it by following the install instructions in the source code and building a new version of nettle (see: https://gitlab.com/gnutls/gnutls/blob/master/INSTALL.md#compilation). – DevJoe Feb 19 '19 at 16:58
  • Same issue for macOS 10.14.6: Libnettle 3.4.1 was not found. http://pkgconfig.freedesktop.org/releases/ can help. – Oleksii Kyslytsyn Sep 18 '19 at 16:29
  • 1
    In the config.log it is mentioned that we should `Package nettle was not found in the pkg-config search path. Perhaps you should add the directory containing 'nettle.pc' to the PKG_CONFIG_PATH environment variable. No package 'nettle' found`. I found nettle.pc inside /pkgconfig/. – Harish Ganesan Feb 16 '20 at 18:47

5 Answers5

7

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.

luart
  • 1,383
  • 1
  • 18
  • 25
2

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/.

wushan.lg
  • 21
  • 1
2

This package worked for me:

sudo apt-get install nettle-dev
0

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)
seanmk
  • 1,934
  • 15
  • 28
0

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
Pamela
  • 1