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

installation/usage not clear #1

Open
jimsalterjrs opened this issue Jun 6, 2016 · 8 comments
Open

installation/usage not clear #1

jimsalterjrs opened this issue Jun 6, 2016 · 8 comments

Comments

@jimsalterjrs
Copy link

jimsalterjrs commented Jun 6, 2016

Hi - I don't know anything about Go, so it's entirely possible this is pure noobishness on my part. But I could use a touch of documentation beyond what's in the README.MD.

I'm on Ubuntu Trusty 14.04 LTS. Preparatory steps I took:

  • cloned the repository
  • generated an API key and saved it in ~/git/stargazers.apikey
  • apt-get install gccgo gccgo-go

Error message I got:

me@locutus:~/git/stargazers$ go run main.go --repo=jimsalterjrs/sanoid --token=`cat ../stargazers.apikey`
main.go:26:2: cannot find package "github.com/spencerkimball/stargazers/cmd" in any of:
    /usr/src/pkg/github.com/spencerkimball/stargazers/cmd (from $GOROOT)
    ($GOPATH not set)
main.go:27:2: cannot find package "github.com/spf13/cobra" in any of:
    /usr/src/pkg/github.com/spf13/cobra (from $GOROOT)
    ($GOPATH not set)

Clearly it wants the spf13/cobra package as a dependency, and I suppose I could go fetch that, but it also seems to want the files in these projects installed in a hierarchy that doesn't actually exist anywhere. I have a sneaking feeling that rather than trying to manually create a matching hierarchy and move things around and set GOROOT to match my manually created hierarchy, there's something "simple and obvious" I should be doing...

Help, please?

@jimsalterjrs
Copy link
Author

The rabbit hole gets deeper the further I go. I went ahead and manually set up a hierarchy and put stargazers in the right place and cobra in the right place and then cockroach in its right place, but...

me@locutus:~/git/src/pkg/github.com/spencerkimball/stargazers$ go run main.go --repo=jimsalterjrs/sanoid --token=`cat ~/git/stargazers.apikey`
../../cockroachdb/cockroach/util/net.go:32:2: cannot find package "github.com/cockroachdb/cmux" in any of:
    /home/jrs/git/src/pkg/github.com/cockroachdb/cmux (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/humanizeutil/humanize.go:23:2: cannot find package "github.com/dustin/go-humanize" in any of:
    /home/jrs/git/src/pkg/github.com/dustin/go-humanize (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/jsonpb_marshal.go:24:2: cannot find package "github.com/gengo/grpc-gateway/runtime" in any of:
    /home/jrs/git/src/pkg/github.com/gengo/grpc-gateway/runtime (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/http.go:24:2: cannot find package "github.com/gogo/protobuf/jsonpb" in any of:
    /home/jrs/git/src/pkg/github.com/gogo/protobuf/jsonpb (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/build/info.pb.go:16:8: cannot find package "github.com/gogo/protobuf/proto" in any of:
    /home/jrs/git/src/pkg/github.com/gogo/protobuf/proto (from $GOROOT)
    ($GOPATH not set)
fetch/cache.go:31:2: cannot find package "github.com/kennygrant/sanitize" in any of:
    /home/jrs/git/src/pkg/github.com/kennygrant/sanitize (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/log/trace.go:20:2: cannot find package "github.com/opentracing/opentracing-go" in any of:
    /home/jrs/git/src/pkg/github.com/opentracing/opentracing-go (from $GOROOT)
    ($GOPATH not set)
../../spf13/cobra/bash_completions.go:10:2: cannot find package "github.com/spf13/pflag" in any of:
    /home/jrs/git/src/pkg/github.com/spf13/pflag (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/log/context.go:19:8: cannot find package "golang.org/x/net/context" in any of:
    /home/jrs/git/src/pkg/golang.org/x/net/context (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/net.go:30:2: cannot find package "golang.org/x/net/http2" in any of:
    /home/jrs/git/src/pkg/golang.org/x/net/http2 (from $GOROOT)
    ($GOPATH not set)
../../cockroachdb/cockroach/util/net.go:28:2: cannot find package "google.golang.org/grpc" in any of:
    /home/jrs/git/src/pkg/google.golang.org/grpc (from $GOROOT)
    ($GOPATH not set)

O Lawd.

Any chance of an INSTALL document that actually lists all the dependencies and a recommended way of satisfying them?

@spencerkimball
Copy link
Owner

This looks like a problem with your $GOPATH variable. Is it in fact not
set? In your case, looks like it should be set to /home/jrs/git and you
should unset GOROOT.

Also, instead of just running go run main.go ..., you should do: go run *.go ... or else go build; ./stargazers ...

On Mon, Jun 6, 2016 at 5:09 PM, Jim Salter [email protected] wrote:

The rabbit hole gets deeper the further I go. I went ahead and manually
set up a hierarchy and put stargazers in the right place and cobra in the
right place and then cockroach in its right place, but...

me@locutus:~/git/src/pkg/github.com/spencerkimball/stargazers$ go run main.go --repo=jimsalterjrs/sanoid --token=cat ~/git/stargazers.apikey
../../cockroachdb/cockroach/util/net.go:32:2: cannot find package "github.com/cockroachdb/cmux" in any of:
/home/jrs/git/src/pkg/github.com/cockroachdb/cmux (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/humanizeutil/humanize.go:23:2: cannot find package "github.com/dustin/go-humanize" in any of:
/home/jrs/git/src/pkg/github.com/dustin/go-humanize (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/jsonpb_marshal.go:24:2: cannot find package "github.com/gengo/grpc-gateway/runtime" in any of:
/home/jrs/git/src/pkg/github.com/gengo/grpc-gateway/runtime (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/http.go:24:2: cannot find package "github.com/gogo/protobuf/jsonpb" in any of:
/home/jrs/git/src/pkg/github.com/gogo/protobuf/jsonpb (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/build/info.pb.go:16:8: cannot find package "github.com/gogo/protobuf/proto" in any of:
/home/jrs/git/src/pkg/github.com/gogo/protobuf/proto (from $GOROOT)
($GOPATH not set)
fetch/cache.go:31:2: cannot find package "github.com/kennygrant/sanitize" in any of:
/home/jrs/git/src/pkg/github.com/kennygrant/sanitize (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/log/trace.go:20:2: cannot find package "github.com/opentracing/opentracing-go" in any of:
/home/jrs/git/src/pkg/github.com/opentracing/opentracing-go (from $GOROOT)
($GOPATH not set)
../../spf13/cobra/bash_completions.go:10:2: cannot find package "github.com/spf13/pflag" in any of:
/home/jrs/git/src/pkg/github.com/spf13/pflag (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/log/context.go:19:8: cannot find package "golang.org/x/net/context" in any of:
/home/jrs/git/src/pkg/golang.org/x/net/context (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/net.go:30:2: cannot find package "golang.org/x/net/http2" in any of:
/home/jrs/git/src/pkg/golang.org/x/net/http2 (from $GOROOT)
($GOPATH not set)
../../cockroachdb/cockroach/util/net.go:28:2: cannot find package "google.golang.org/grpc" in any of:
/home/jrs/git/src/pkg/google.golang.org/grpc (from $GOROOT)
($GOPATH not set)

O Lawd.

Any chance of an INSTALL document that actually lists all the dependencies
and a recommended way of satisfying them?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AF3MTROAouyw0p8uXQKJnEnE6Bm7c8QPks5qJIycgaJpZM4IvTPN
.

@ntwb
Copy link

ntwb commented Jun 16, 2016

Yeah, $GOPATH I think is your issue here, I've done the same, about a week ago I installed Go to try this out and have hacked my way through manually installing the dependencies 😏

Set your $GOPATH to ~/git/stargazers/cmd is how I got up and running....

@ianmiell
Copy link

ianmiell commented Jul 17, 2016

I can't seem to get this built either - tried various Docker containers and combinations of commands.

Is there a Dockerfile available? I couldn't find one on DH.

@riebling
Copy link

riebling commented Jun 8, 2017

Yet another cry for an INSTALL. Just a couple lines of text or a shell script to build the thing would do WORLDS of help to people unfamiliar with go, who may be too busy to take on learning yet another entire language and ecosystem just to achieve the nifty solution that stargazers provides

@upgradeQ
Copy link

install go , then go get -u github.com/spf13/cobra/cobra after this go get -u https://github.com/spencerkimball/stargazers . Run command inside your stargazers direcotry go run main.go

@pommedeterresautee
Copy link

go mod init github.com/spencerkimball
go mod tidy
go build
./spencerkimball ... # enjoy

@janaka
Copy link

janaka commented Mar 5, 2024

to execute ./main ^

or go build -o stargazers then you can execute ./stargazers as per the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants