spencerkimball / stargazers

Analyze GitHub stars
Apache License 2.0
496 stars 41 forks source link

installation/usage not clear #1

Open jimsalterjrs opened 8 years ago

jimsalterjrs commented 8 years ago

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:

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 commented 8 years ago

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 commented 8 years ago

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 notifications@github.com 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 https://github.com/spencerkimball/stargazers/issues/1#issuecomment-224089370, or mute the thread https://github.com/notifications/unsubscribe/AF3MTROAouyw0p8uXQKJnEnE6Bm7c8QPks5qJIycgaJpZM4IvTPN .

ntwb commented 8 years ago

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 commented 8 years ago

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 commented 7 years ago

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 commented 6 years ago

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 commented 2 years ago
go mod init github.com/spencerkimball
go mod tidy
go build
./spencerkimball ... # enjoy
janaka commented 6 months ago

to execute ./main ^

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