Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

go install: no install location for directory

Tags:

git

go

I get the error go install: no install location for directory.

My $GOPATH environment variable is set just fine. The issue I have is that I don't want to develop inside my go workspace. Or is this my only choice?

I have a git repo sitting somewhere else and I would like to work inside there, if the binaries are compiled into the $GOPATH that is fine - but I'd expect to be able to compile / run builds from an arbitrary directory.

I wouldn't expect another collaborator to have to clone the repo into their go workspace? That seems like a serious limitation to me.

like image 752
greenimpala Avatar asked Oct 01 '13 19:10

greenimpala


1 Answers

Either:

  1. Change your GOPATH
  2. Add more entries to GOPATH
  3. Don't compile with go, but the compiler and linker themself

I wouldn't expect another collaborator to have to clone the repo into their go workspace? That seems like a serious limitation to me.

It is not. That is exactly what a "go workspace" is for.

like image 171
Volker Avatar answered Oct 23 '22 02:10

Volker