go install: no install location for directory outside GOPATH

来源:互联网 发布:centos ip配置 编辑:程序博客网 时间:2024/06/10 15:53

When you run go install Go looks for $GOBIN env variable path. Either you need to set your $GOBIN to $GOPATH/bin

$ export GOBIN=$GOPATH/bin

and/or add $GOBIN to your OS search path

$ export PATH=$PATH:$GOBIN

To use the command without getting the error.

0 0
原创粉丝点击