4

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
  • 73
  • 1
  • 4
  • 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

2 Answers2

2

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,135
  • 1
  • 13
  • 22
1

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