首页 > 解决方案 > 在macOS上构建锯齿事务处理器时出现构建错误

问题描述

我正在尝试在 macos 上构建锯齿交易处理器。事务处理器是用 golang 编写的。当我这样做go build时,会引发以下错误:

go build
# github.com/hyperledger/sawtooth-sdk-go/signing
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)

请注意openssl已经安装

任何建议/评论都会非常有帮助。

标签: gohyperledger-sawtooth

解决方案


执行以下两个命令解决了这个问题:

ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib
ln -s /usr/local/opt/openssl/lib/libcrypto.a /usr/local/lib

推荐阅读