4

I'm trying to build GnuTLS-3.x on my OS X Lion and here is my configure command:

./configure --prefix=/usr/local/gnutls-3.4.9 --with-included-libtasn1 --without-p11-kit

It ends up

checking for NETTLE... no
configure: error:
  ***
  *** Libnettle 3.4.1 was not found.

though libnettle-3.4.1 is installed under /usr/local/libnettle-3.4.1 and its pkg-config file libnettle.pc is defined under /usr/local/lib/pkgconfig (I've built nettle-4.3.1 from source successfully)

I've read the stackoverflow post GnuTLS Libnettle 3.4 was not found but it didn't help a bit. All other posts on the Internet didn't help either.

I'm stuck on this error. Any help is appreciated. Thanks.

4

2 回答 2

2

我找到了问题的原因。这是错误定义的环境变量PKG_CONFIG。只是设置到pkg-configie的安装目录/usr/local/pkg-config-0.28

但是看起来它必须设置为完整路径加上pkg-config命令本身,例如:/usr/local/pkg-config-0.28/bin/pkg-config

于 2019-09-03T16:01:03.450 回答
0

PKG_CONFIG应该包括nettle.pcand ,在我在 Linux Ubuntu 20.04 x64 上的构建中hogweed.pc没有复制到,所以我必须配置如下:/usr/lib/pkgconfig/nettle3gnutls3

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

NETTLE3_ROOT来源路径在哪里nettle3

于 2020-09-27T12:16:35.770 回答