当前位置:首页 > cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

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

点击次数:3028  更新日期:2021-02-24

go run 时,提示 cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

提示这个错误是要安装一下GCC

到 https://sourceforge.net/projects/mingw-w64/files/mingw-w64/ 这里下载MinGW的压缩文件,比如 x86_64-posix-seh ,解压后,将目录中的bin路径添加到环境变量的Path中

然后重新打开cmd再运行就可以了