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

Missing dependencies in install instructions #92

Merged
merged 2 commits into from
Dec 2, 2014
Merged

Conversation

GUI
Copy link
Contributor

@GUI GUI commented Dec 2, 2014

When following the setup instructions for installing the web server, I ran into errors related to missing dependencies. Here's an example of the errors on a completely fresh install (go version 1.3.3):

$ export GOPATH=/tmp/freegeoip
$ go get github.com/fiorix/freegeoip
$ go install github.com/fiorix/freegeoip/cmd/freegeoip
/tmp/freegeoip/src/github.com/fiorix/freegeoip/cmd/freegeoip/main.go:20:2: cannot find package "github.com/fiorix/go-redis/redis" in any of:
    /opt/local/go/src/pkg/github.com/fiorix/go-redis/redis (from $GOROOT)
    /tmp/freegeoip/src/github.com/fiorix/go-redis/redis (from $GOPATH)
/tmp/freegeoip/src/github.com/fiorix/freegeoip/cmd/freegeoip/main.go:21:2: cannot find package "github.com/gorilla/context" in any of:
    /opt/local/go/src/pkg/github.com/gorilla/context (from $GOROOT)
    /tmp/freegeoip/src/github.com/gorilla/context (from $GOPATH)

I was able to fix this by explicitly getting the go-redis and context packages before running the install command. This pull request simply updates the readme with these additional commands to get those packages.

However, I'm new to Go, so if there's a way to setup those packages as dependencies so they automatically get fetched, that might be preferable, but I at least wanted to raise the issue for anyone else that might be running into this on a fresh install.

Thanks for the great package!

Without explicitly getting these packages, the install command fails with missing dependency errors.
@fiorix
Copy link
Owner

fiorix commented Dec 2, 2014

I think if you just do go get github.com/fiorix/freegeoip/cmd/freegeoip it should download all dependencies and build the binary already. Could you please check? That'd be a much simpler change in the instructions: from go install to go get.

@GUI
Copy link
Contributor Author

GUI commented Dec 2, 2014

Ah, that simpler approach worked great. Thanks! I've updated this PR if you want 2 commits to change one word. :)

fiorix added a commit that referenced this pull request Dec 2, 2014
Missing dependencies in install instructions
@fiorix fiorix merged commit 49f5e25 into fiorix:master Dec 2, 2014
@fiorix
Copy link
Owner

fiorix commented Dec 2, 2014

That's fine. Thank you!

GUI added a commit to NREL-cookbooks/freegeoip that referenced this pull request Dec 30, 2014
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

Successfully merging this pull request may close these issues.

2 participants