我正在使用 Windows 10。当我尝试构建 Chaincode 时,它报告了这个错误
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
exec: "gcc": executable file not found in %PATH%
我的链码导入:
import (
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)
它在 Docker 中运行良好。
原文由 jaswanth 发布,翻译遵循 CC BY-SA 4.0 许可协议
gcc (GNU Compiler Collection)提供了一个 C 编译器。在 Windows 上,安装 TDM-GCC 。
github.com/miekg/pkcs11
包使用 cgo 。 Cgo 允许创建调用 C 代码的 Go 包。