Closed
Description
What steps will reproduce the problem? 1. ~/bug.go contains any program compiling successfully (e.g. http://play.golang.org/p/RQT4BfIN7h) 2. go install ~/bug.go Reading the documentation of "go install" I expect it to fail because ~/bug.go is not an import path. Instead this error message is logged: "go install: no install location for .go files listed on command line (GOBIN not set)" In any case there's a documentation in the bug, since there's no mention $GOBIN. Once the expected behavior clarified I'm happy to try to fix it.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
ianlancetaylor commentedon Aug 1, 2014
Comment 1:
Labels changed: added repo-main, release-none.
carstn commentedon Sep 14, 2015
The same incorrect error message is outputted when you
go install
some .go file that doesn't contain amain
package.For example, if you run
go install mgorus.go
on github.com/weekface/mgorus, the compiler complains:go install: no install location for .go files listed on command line (GOBIN not set)
.This doesn't describe the correct problem. The problem is that you can install only
main
packages, not that GOBIN is not set (echo $GOBIN
returns/Users/carstn/Code/go/bin
).current go version and os: go1.5 darwin/amd64
coltin commentedon Nov 12, 2015
@carstn is correct, I'm seeing the same thing. I tried to install a library with GOBIN set and I get this error message.
$ go version
go version go1.5.1 darwin/amd64
bcmills commentedon Jan 23, 2019
#23439 is a duplicate of this, but has quite a bit more discussion. Consolidating into that issue.