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: GOPATH instead of GOROOT causes: go install: no install location for _/home/aj/go/src/code.google.com/p/goprotobuf/proto #3278

Closed
gopherbot opened this issue Mar 11, 2012 · 4 comments
Milestone

Comments

@gopherbot
Copy link

by andreas@ionisiert.de:

What steps will reproduce the problem?
cd
rm -rf go
hg clone -u weekly https://go.googlecode.com/hg/ go/
cd go/src
./all.bash
go get code.google.com/p/goprotobuf/{proto,protoc-gen-go}
package code.google.com/p/goprotobuf/proto
        imports code.google.com/p/goprotobuf/proto: import "code.google.com/p/goprotobuf/proto": cannot find package
package code.google.com/p/goprotobuf/protoc-gen-go
        imports code.google.com/p/goprotobuf/protoc-gen-go: import "code.google.com/p/goprotobuf/protoc-gen-go": cannot find package

cd code.google.com/p/goprotobuf/proto
go build
go install
go install: no install location for _/home/aj/go/src/code.google.com/p/goprotobuf/proto

What is the expected output?
go get should work / fail with an error message pointing to the source of the problem.

What do you see instead?
a cryptic error message.

Which compiler are you using (5g, 6g, 8g, gccgo)?
amd64

Which operating system are you using?
linux

Which revision are you using?  (hg identify)
weekly 2012-03-04

Please provide any additional information below.

source of my problems: I had GOPATH set instead of GOROOT.
fixing that now everything is fine. but the error messsage doesn't
help to find out what is wrong and migth confuse new users.
@dsymonds
Copy link
Contributor

Comment 1:

The go tool should give better diagnostics in this kind of situation.
(this may already be fixed at tip)

Labels changed: added priority-go1, toolbug, removed priority-triage.

Owner changed to @rsc.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2012

Comment 2:

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Mar 27, 2012

Comment 3:

Status changed to Duplicate.

Merged into issue #3207.

@gopherbot
Copy link
Author

Comment 4 by xzh5299:

this is caused by not setting GOPATH for this workspace.
open a terminate,and export GOPATH=/home/aj/go ,and try again.
good luck.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@rsc rsc removed the priority-go1 label Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
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