Error “cannot download, $GOPATH not set.”

后端 未结 6 1537
南旧
南旧 2021-02-02 08:41

Setup:

Have a look at my configuration:

$ echo $GOPATH && ls -r $GOPATH
/home/cyrus/.go
src  pkg  bin

$ echo $GOROOT &&         


        
6条回答
  •  天命终不由人
    2021-02-02 09:07

    First do a `go env' and check the path GOROOT. Accordingly set the GOPATH. In my case, it had to set GOPATH to /usr/lib/go. Earlier i tried it with /usr/share/go and /usr/bin/go but it didn't work.

提交回复
热议问题