Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go install report GOBIN not set #21212

Closed
beary opened this issue Jul 29, 2017 · 2 comments
Closed

cmd/go: go install report GOBIN not set #21212

beary opened this issue Jul 29, 2017 · 2 comments

Comments

@beary
Copy link

beary commented Jul 29, 2017

What version of Go are you using (go version)?

go version go1.8.3 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN="/Users/beary/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/beary/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/ms/ytrwlccj47j89_knrz_qxr4m0000gn/T/go-build783820727=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

I open /User/beary/go and run go install demo/demo.go. it's work well and generate a demo file on /User/beary/go/bin.

But when I run go install github.com/golang/lint/lint.go, the result is go install: no install location for .go files listed on command line (GOBIN not set)

This is my environment setting

export GOROOT="/usr/local/go"
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH="$PATH:$GOROOT/bin:$GOBIN"

My os is macOS Sierra 10.12.6

@cznic
Copy link
Contributor

cznic commented Jul 29, 2017

But when I run go install github.com/golang/lint/lint.go, the result is go install: no install location for .go files listed on command line (GOBIN not set)

That's expected. The correct command is go install github.com/golang/lint/golint, ie. an import path, not a file path.

@beary
Copy link
Author

beary commented Jul 29, 2017

@cznic Thank you!

@beary beary closed this as completed Jul 29, 2017
@mikioh mikioh changed the title go install report GOBIN not set cmd/go: go install report GOBIN not set Aug 2, 2017
@golang golang locked and limited conversation to collaborators Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants