在 macOS 上构建锯齿交易处理器时出现构建错误

go build error while building sawtooth transaction processor on 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已经安装

任何 suggestion/comment 都会很有帮助。

执行以下两个命令修复了问题:

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