当前位置: 首页 >> Go >> 【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH% >> 正文

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

1年前 (2023-04-02)     作者:Jiaozn     分类:Go     阅读次数:1344     评论(0)    

Go开发报错,windows需要gcc支持,报错:cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%,需要安装一下gcc

解决方法:

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

 下载这个版本:

image.png

解压缩放入C:\Program Files目录下:

image.png

 配置环境变量:

image.png



除非注明,发表在“Jiaozn的博客”的文章『【Go】cgo: C compiler “gcc“ not found: exec: “gcc“: executable file not found in %PATH%』版权归Jiaozn所有。 转载请注明出处为“本文转载于『Jiaozn的博客』原地址https://www.jiaozn.com/reed/833.html
0

评论

发表评论   

昵称*

E-mail*(建议输入,以便收到博主回复的提示邮件)

网站

分享:

支付宝

微信