Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

时间:2024-04-12 17:35:34

这个就是一个缺少gcc编译器的报错而已,只需要下载正确的程序包安装配置好即可

1.打开 mingw-w64官网,并点击download跳转到下载页面

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

2.选择我们的windows版本安装包,并点击对应连接查看信息

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

3.点击进入包下载界面,会自动下载的

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

4.打开程序包安装

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

5.正确选择自己环境的配置,然后下一步

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

6.选择安装路径,并记下自己的安装路径,因为我们一会儿还需要配置环境变量

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

然后下一步开始安装

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

7.到这里我们的安装已经安装,下一步配置环境变量

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

copy我们的安装路径/bin目录,然后配置到环境变量里即可

Windows环境golang程序开发 报错exec: gcc: executable file not found in %PATH%

8.保存完环境变量后,如果是用的goland开发,记得重启goland

安装完成!!!

有问题或意见欢迎留言!