tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.06k stars 1.88k forks source link

Error during image building #35

Closed hutger closed 7 years ago

hutger commented 7 years ago

Hi, I've got the error below whenever I execute the command:

go install -tags rethinkdb github.com/tinode/chat/tinode-db /go/src/github.com/tinode/chat/server/db/rethinkdb/adapter.go:16:2: cannot find package "gopkg.in/gorethink/gorethink.v2" in any of: /usr/local/go/src/gopkg.in/gorethink/gorethink.v2 (from $GOROOT) /go/src/gopkg.in/gorethink/gorethink.v2 (from $GOPATH)

Do you have some clue about what's generating that error?

or-else commented 7 years ago

What's your go version?

go version

or-else commented 7 years ago

Did you run go get -u?

hutger commented 7 years ago

The go version is: go1.9.2

I’m using the docker golang image.

docker build --tag=tinode-init-db init-rethinkdb

On Tuesday, 31October, 2017 at 16:23, Gene wrote:

What's your go version? go version

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/tinode/chat/issues/35#issuecomment-340879233), or mute the thread (https://github.com/notifications/unsubscribe-auth/ASRJoj1g8Bshr8Cpd38G2uUZYDcxYQc9ks5sx3OrgaJpZM4QNGp7).

hutger commented 7 years ago

I did, but I got the same error.

--
Lucas F. A. Junior Fone: (81) 9 9900 8090

On Tuesday, 31October, 2017 at 16:30, Gene wrote:

Did you run go get -u?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/tinode/chat/issues/35#issuecomment-340881176), or mute the thread (https://github.com/notifications/unsubscribe-auth/ASRJohBPggOR3qv1-q-DrDTN1L0jSP3Yks5sx3VQgaJpZM4QNGp7).

or-else commented 7 years ago

Your go setup fails to find versioned third-party package although it's clearly there: http://gopkg.in/gorethink/gorethink.v2

Something is wrong with your setup. What's you $GOROOT and $GOPATH? Is your project located at $GOROOT/src?

What do you get for git remote -v?

Btw, when you run go get -u you can't possibly get the same error. What's the exact error message when you run it?

hutger commented 7 years ago

I'm using the most current golang docker image. The default $GOROOT is blank and $GOPATH is /go.

root@ccfe8eb6a013:/go/src# go get -u github.com/tinode/chat/tinode-db root@ccfe8eb6a013:/go/src# go install -tags rethinkdb github.com/tinode/chat/tinode-db github.com/tinode/chat/server/db/rethinkdb/adapter.go:16:2: cannot find package "gopkg.in/gorethink/gorethink.v2" in any of: /usr/local/go/src/gopkg.in/gorethink/gorethink.v2 (from $GOROOT) /go/src/gopkg.in/gorethink/gorethink.v2 (from $GOPATH)

root@ccfe8eb6a013:/go/src# git remote -v fatal: Not a git repository (or any of the parent directories): .git

or-else commented 7 years ago

Fixed https://github.com/tinode/chat/pull/36. Thank you for the bug report!

or-else commented 7 years ago

No update, so I assume it's indeed fixed. Closing.

hutger commented 7 years ago

Sorry, I thought you had already closed the issue. The problem is fixed indeed. Many thanks.