Warm tip: This article is reproduced from serverfault.com, please click

windows-exec:“ gcc”:尝试进行构建时,在%PATH%中找不到可执行文件

(windows - exec: "gcc": executable file not found in %PATH% when trying go build)

发布于 2017-04-24 05:03:25

我正在使用Windows10。当我尝试构建Chaincode时,它报告了此错误。

# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11 
exec: "gcc": executable file not found in %PATH%

我的chaincode导入:

import (
    "fmt"
    "strconv"

    "github.com/hyperledger/fabric/core/chaincode/shim"
    pb "github.com/hyperledger/fabric/protos/peer"
)

它在Docker中运行良好

Questioner
jaswanth
Viewed
11
peterSO 2017-04-24 21:09:03

gcc(GNU编译器集合)提供了C编译器。在Windows上,安装TDM-GCCgithub.com/miekg/pkcs11软件包使用cgoCgo支持创建调用C代码的Go包。