【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%

 cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%

解决方法:

  1. 下载符合自己系统版本的压缩包,MinGW-w64 - for 32 and 64 bit Windows - Browse /mingw-w64 at SourceForge.net

 下载这个版本:【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%_第1张图片

 解压缩放入C:\Program Files目录下:【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%_第2张图片

 配置环境变量:

【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%_第3张图片

设置环境变量path

【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%_第4张图片

 打开cmd窗口, 输入 gcc -v 能看到版本号,就安装成功了。

 

你可能感兴趣的:(开发工具,java,服务器,javascript)