如何链接安装在自定义目录中的libgpg-error来构建libgcrypt

问题描述 投票:0回答:1

我正在尝试编译 libgcrypt 1.8.10。我在尝试使用命令创建 libgcrypt 时遇到以下问题

./configure:
>checking whether to enable AMD64 as(1) feature detection... yes
>checking for gpg-error-config... no
>checking for GPG Error - version >= 1.25... no
>
>configure: error: libgpg-error is needed.
>                See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .

所以我在“/tmp/Abhiyjn/app”目录中构建并安装了“libgpg-error-1.47”。就安装成功了。然后我尝试再次创建 libgcrypt,但我仍然收到同样的问题。之后,我尝试再次构建 libgcrypt,但遇到了同样的问题。我尝试使用选项执行配置脚本

./configure --prefix=/tmp/Abhiyjn/app/ LDFLAGS="-L/tmp/Abhiyjn/app/lib" CFLAGS="-I/tmp/Abhiyjn/app/include"

./configure --prefix=/tmp/Abhiyjn/app/ --with-libgpg-error-prefix="/tmp/Abhiyjn/app/lib/libgpg-error.so" CFLAGS="-I/tmp/Abhiyjn /应用程序/包括”

./configure --prefix=/tmp/Abhiyjn/app/LDFLAGS=-L"/tmp/Abhiyjn/app/lib/pkgconfig/"

但它们都不起作用,如何正确链接我安装在客户目录中的libgpg-error

build gnupg configure
1个回答
0
投票

在链接 libgpg-error 来构建 libgcrypt 时遇到困难后,我找到了一个适合我的解决方案。这就是我所做的:

构建并安装 libgpg-error:

  • 我使用以下配置选项配置了 libgpg-error:
    ./configure --prefix=/tmp/Abhiyjn/app --enable-install-gpg-error-config
    
  • 配置后,我构建并安装了 libgpg-error 到自定义目录中
    /tmp/Abhiyjn/app
    gpg-error-config
    实用程序已安装在
    /tmp/Abhiyjn/app/bin
    中。

使用链接的 libgpg-error 构建 libgcrypt:

  • 成功安装 libgpg-error 后,我重新尝试构建 libgcrypt。这次,我使用
    --with-libgpg-error-prefix
    选项指定了 libgpg-error 安装的自定义目录的位置:
    ./configure --prefix=/tmp/Abhiyjn/app --with-libgpg-error-prefix=/tmp/Abhiyjn/app
    
  • 使用这些选项运行
    ./configure
    没有任何问题。

构建并安装 libgcrypt:

  • 最后,我使用
    make
    构建了 libgcrypt 并使用
    make install
    安装了它。这将 libgcrypt 安装到自定义目录中
    /tmp/Abhiyjn/app
© www.soinside.com 2019 - 2024. All rights reserved.