Open doggy8088 opened 4 years ago
Here are the steps reproduce my problem:
install & use & env
gvm install go1.14.6 gvm use go1.14.6 go env
The GOBIN="" is empty.
GOBIN=""
I know the GOBIN's default value is $GOPATH/bin by default. But I can't run go install to install my command to $GOPATH/bin.
GOBIN
$GOPATH/bin
go install
sample app & go install
mkdir test1 && cd test1 cat <<EOF > main.go package main import "fmt" func main() { fmt.Println("Hello") } EOF go install
I'll get this:
~/test1$ go install go install: no install location for directory /home/will/test1 outside GOPATH For more details see: 'go help gopath'
When setup GOBIN env variable, all problem gone.
export GOBIN=$GOPATH/bin go install
Here are the steps reproduce my problem:
install & use & env
The
GOBIN=""
is empty.I know the
GOBIN
's default value is$GOPATH/bin
by default. But I can't rungo install
to install my command to$GOPATH/bin
.sample app &
go install
I'll get this:
When setup
GOBIN
env variable, all problem gone.