gocode安装失败
在/usr/local/go/bin
目录下手动创建gocode目录就可以解决
wangdongyang@wdy:/usr/local$ go get -u github.com/nsf/gocode
go install github.com/nsf/gocode: open /usr/local/go/bin/gocode: permission denied
wangdongyang@wdy:/usr/local$ ls -la /usr/local/go/bin/
总用量 27504
drwxr-xr-x 2 root root 4096 8月 9 03:21 .
drwxr-xr-x 11 root root 4096 8月 9 03:21 ..
-rwxr-xr-x 1 root root 9953979 8月 9 03:19 go
-rwxr-xr-x 1 root root 15156811 8月 9 03:21 godoc
-rwxr-xr-x 1 root root 3036195 8月 9 03:18 gofmt
wangdongyang@wdy:/usr/local$ sudo mkdir /usr/local/go/bin/gocode
wangdongyang@wdy:/usr/local$ go get -u github.com/nsf/gocode
open dlv安装失败
go install github.com/derekparker/delve/cmd/dlv: open /usr/local/go/bin/dlv: permission denied
同样在/usr/local/go/bin
目录下手动创建dlv目录就可以解决
提示 $GOPATH not set
参考 这个
$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
vscode配置go开发环境,出现插件无法安装的情况时参照上面的方法
http://www.cnblogs.com/zsy/archive/2016/02/28/5223957.html
有疑问加站长微信联系(非本文作者)