Indy-sdk 构建错误:“未定义架构 x86_64 的符号”

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

我试图从 hyperledger 文档 手动构建 indy-sdk(自动构建不起作用) macOS 蒙特利 12.6.6、Xcode 14.0.1、终端 zsh
安装了相关库:pkg-config、libsodium 1.0.12、automake、autoconf、cmake、openssl 1.1、zeromq、zmq

在第 6 步,当我使用此命令设置环境变量时,出现以下错误:

    export LIBRARY_PATH=/path/to/sdk/libindy/target/<config>
    zsh: parse error near `\n'

然后我尝试使用下面的代码设置环境变量

    export LIBRARY_PATH=/users/user/indy-sdk/libindy/target

顺便说一句,目标文件夹下没有配置文件。我检查了它,找不到任何父文件夹作为 /path 或 /to 或 /sdk,这令人困惑。

但是当我继续下一步时:

    cd /indy-sdk/cli. 
    cargo build

它给了我这些错误消息:

    error: linking with `cc` failed: exit status: 1

terminal ss

    could not compile `indy-cli` (bin "indy-cli") due to previous 
    error
    Undefined symbols for architecture x86_64

我被困住了,感谢任何帮助。

卸载并重新安装 Rust

xcode rust-cargo hyperledger-indy
1个回答
1
投票

解决了!!

按照此处的设置指南链接!除少数例外,请参阅下面的内容:

在第 1 步:

    brew install libsodium
    brew instal [email protected]

在步骤4:

    export OPENSSL_DIR=/usr/local/Cellar/[email protected]/1.1.1u

在第 6 步(请注意,您的 indy-sdk 文件夹可以克隆到不同的目录,因此请相应地安排):

    export LIBRARY_PATH=/users/user/indy-sdk/libindy/target/debug
    
© www.soinside.com 2019 - 2024. All rights reserved.