$GOPATH not set 问题解决方案

环境配置:

RyanMacbookPro:work$ env | grep GO

GOBIN=/usr/local/go/bin

GOARCH=amd64

GOROOT=/usr/local/go

GOOS=darwin

GOPATH=/Users/ryan/go

执行安装

sudo go get github.com/nsf/gocode

提示:

cannot download, $GOPATH not set. For more details see: go help gopath

解决方案:

sudo env GOPATH=/Users/ryan/go go get github.com/nsf/gocode

 

posted on 2014-03-19 21:08  Ryan_Y  阅读(22857)  评论(0编辑  收藏  举报