Error “cannot download, $GOPATH not set.”

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

    $GOPATH should be your current workspace , a folder where your project resides. or just cd ~/go and try to run those commands. Or you can just update $GOPATH in ~/.bashrc or ~/.bashrc_profile on ubuntu

提交回复
热议问题