Error “cannot download, $GOPATH not set.”

后端 未结 6 1387
南旧
南旧 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:21

    When you run go env, you should be able to see if your GOPATH has been set. On my case though, this command solves it when I had it run on my terminal.

    export GOPATH=/usr/local/bin
    

提交回复
热议问题