美文网首页
"The selected directory is not a

"The selected directory is not a

作者: SailSea | 来源:发表于2021-12-09 11:19 被阅读0次
image.png

昨天go从1.15升级到1.17后发现goland一直无法配置sdk,提示"The selected directory is not a valid home for Go Sdk"如上图

检查环境变量无问题

GOROOT 安装路径无问题

cmd 测试 golang 命令正常使用

重启电脑无法解决

解决办法

1.执行go version 找到自己安装的详细版本
2.编辑{GOROOT}/src/runtime/internal/sys/zversion.go文件
添加

const TheVersion = `go1.17.4`

3.重启goland即可发现


image.png

参考链接
https://stackoverflow.com/questions/19108421/the-selected-directory-is-not-a-valid-home-for-go-sdk

相关文章

网友评论

      本文标题:"The selected directory is not a

      本文链接:https://www.haomeiwen.com/subject/pyhffrtx.html