Can't load package: package github.com/gchaincl/httplab/cmd/httplab
Closed this issue · 5 comments
I'm not a Go developer, so only following the instruction in the README:
$ go install github.com/gchaincl/httplab/cmd/httplab
can't load package: package github.com/gchaincl/httplab/cmd/httplab: cannot find package "github.com/gchaincl/httplab/cmd/httplab" in any of:
/usr/local/go/src/github.com/gchaincl/httplab/cmd/httplab (from $GOROOT)
/home/user/go/src/github.com/gchaincl/httplab/cmd/httplab (from $GOPATH)
There is a remote location to install this package? Do I have to download the sources an place them into the /usr/local/go/
folder to install it? Because /usr/local/go
is not a user folder, It shouldn't be required to install an app like this, and isn't specified in the README instructions.
not sure what's happening there, as a workaround, I'd suggest you to check the releases: https://github.com/gchaincl/httplab/releases/tag/v0.3.0 and download the binary
Yes, downloading the binary version and executing it works!
Just to add a bit more information about my environment:
~ go version
go version go1.8.3 linux/amd64
~ uname -a
Linux trusty 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
everything seems right, can you echo $GOPATH
mmm checking the installation guide at https://golang.org/doc/install#testing I see that I need to define the variable $GOPATH
, sorry. Anyway, I got the same error. Then I placed the project in the correct folder (that isn't specified in the README): $GOPATH/src/github.com/gchaincl/httplab
, and is compiled and installed Ok. The binary is placed at $GOPATH/bin
folder.
I only suggest you to put in the README file a link to the https://github.com/gchaincl/httplab/releases/latest page to download the binary directly, I know that it should be inferred, but mostly projects in Github don't have binary downloads in the release section. And also suggest in the README instructions to place in the correct folder $GOPATH/src/github.com/gchaincl/httplab
the source before install.
Thanks for your help.