8

I'm trying to set up goroot in wls2 Goland,but ut something went wrong: "The selected directory is not a valid home for Go SDK"

enter image description here

What should I do

leonheess
  • 16,068
  • 14
  • 77
  • 112
wujieji
  • 81
  • 1
  • 2

3 Answers3

2

At the moment, as of 2020.1.3, you cannot. See the issue that tracks this request and vote/watch it for updates.

dlsniper
  • 7,188
  • 1
  • 35
  • 44
  • A small update, there is a ticket to exactly support Go SDK in WSL: https://youtrack.jetbrains.com/issue/GO-10618 – s0xzwasd Sep 08 '21 at 10:53
1

October 2021 update.

Go SDK under WSL2 is supported in GoLand since 2021.3 (it reaches Early Access Program at the moment). GoLand suggests selecting Go SDK on WSL2 mount if the location of the project is on WSL2 as well.

enter image description here

s0xzwasd
  • 2,895
  • 3
  • 17
  • 26
0

I found out my issue was having the go source code in c:\ drive. It must be in WSL2 mnt to work correctly. Tested on GoLand 2021.3.1

Kaigo
  • 1,267
  • 2
  • 14
  • 33