exec:“gcc":尝试构建时在 %PATH% 中找不到可执行文件 [英] exec: "gcc": executable file not found in %PATH% when trying go build
本文介绍了exec:“gcc":尝试构建时在 %PATH% 中找不到可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 Windows 10.当我尝试构建 Chaincode它报了这个错误
I am using Windows 10. When I tried to build Chaincode it reported this error
# 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 中运行良好.
推荐答案
gcc(GNU 编译器合集)提供 C 编译器.在 Windows 上,安装 TDM-GCC.github.com/miekg/pkcs11
包使用 cgo.Cgo 支持创建调用 C 代码的 Go 包.
gcc (the GNU Compiler Collection) provides a C compiler. On Windows, install TDM-GCC. The github.com/miekg/pkcs11
package uses cgo. Cgo enables the creation of Go packages that call C code.
这篇关于exec:“gcc":尝试构建时在 %PATH% 中找不到可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文