Docker Community Forums

Share and learn in the Docker community.

"godep go install", NOT working


(Reachchinu) #1

Hello All,
In the github page of swarm (https://github.com/docker/swarm), in “Readme.md” file, it is mentioned that to install swarm the command is “godep go install”.
When I tried the command “godep go install”, I got the following output:

No command 'godep' found, did you mean:
 Command 'godef' from package 'emboss' (universe)
godep: command not found

I have tried installing “godep” from “github.com/tools/godep” using following command

go get github.com/tools/godep
After installing I got no error. so it seems it is installed correctly.
When I tried executing the same command
godep go install
I got the same output.
No command ‘godep’ found, did you mean:
Command ‘godef’ from package ‘emboss’ (universe)
godep: command not found

Please help me resolving this issue.

Without using godep I tried “go install”, but I got following ERROR:

cli/cli.go:8:2: cannot find package “github.com/Sirupsen/logrus” in any of:
/usr/lib/go/src/pkg/github.com/Sirupsen/logrus (from $GOROOT)
/home/funlab/gocode/src/github.com/Sirupsen/logrus (from $GOPATH)
cli/cli.go:9:2: cannot find package “github.com/codegangsta/cli” in any of:
/usr/lib/go/src/pkg/github.com/codegangsta/cli (from $GOROOT)
/home/funlab/gocode/src/github.com/codegangsta/cli (from $GOPATH)
api/flusher.go:8:2: cannot find package “github.com/docker/docker/pkg/ioutils” in any of:
/usr/lib/go/src/pkg/github.com/docker/docker/pkg/ioutils (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/docker/pkg/ioutils (from $GOPATH)
api/handlers.go:17:2: cannot find package “github.com/docker/docker/pkg/parsers/filters” in any of:
/usr/lib/go/src/pkg/github.com/docker/docker/pkg/parsers/filters (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/docker/pkg/parsers/filters (from $GOPATH)
cluster/container.go:6:2: cannot find package “github.com/docker/docker/pkg/stringid” in any of:
/usr/lib/go/src/pkg/github.com/docker/docker/pkg/stringid (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/docker/pkg/stringid (from $GOPATH)
cluster/mesos/utils.go:7:2: cannot find package “github.com/docker/docker/pkg/units” in any of:
/usr/lib/go/src/pkg/github.com/docker/docker/pkg/units (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/docker/pkg/units (from $GOPATH)
cluster/engine.go:15:2: cannot find package “github.com/docker/docker/pkg/version” in any of:
/usr/lib/go/src/pkg/github.com/docker/docker/pkg/version (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/docker/pkg/version (from $GOPATH)
discovery/kv/kv.go:10:2: cannot find package “github.com/docker/libkv” in any of:
/usr/lib/go/src/pkg/github.com/docker/libkv (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/libkv (from $GOPATH)
discovery/kv/kv.go:11:2: cannot find package “github.com/docker/libkv/store” in any of:
/usr/lib/go/src/pkg/github.com/docker/libkv/store (from $GOROOT)
/home/funlab/gocode/src/github.com/docker/libkv/store (from $GOPATH)
cluster/mesos/cluster.go:21:2: cannot find package “github.com/gogo/protobuf/proto” in any of:
/usr/lib/go/src/pkg/github.com/gogo/protobuf/proto (from $GOROOT)
/home/funlab/gocode/src/github.com/gogo/protobuf/proto (from $GOPATH)
api/handlers.go:20:2: cannot find package “github.com/gorilla/mux” in any of:
/usr/lib/go/src/pkg/github.com/gorilla/mux (from $GOROOT)
/home/funlab/gocode/src/github.com/gorilla/mux (from $GOPATH)
cluster/mesos/cluster.go:22:2: cannot find package “github.com/mesos/mesos-go/mesosproto” in any of:
/usr/lib/go/src/pkg/github.com/mesos/mesos-go/mesosproto (from $GOROOT)
/home/funlab/gocode/src/github.com/mesos/mesos-go/mesosproto (from $GOPATH)
cluster/mesos/task.go:14:2: cannot find package “github.com/mesos/mesos-go/mesosutil” in any of:
/usr/lib/go/src/pkg/github.com/mesos/mesos-go/mesosutil (from $GOROOT)
/home/funlab/gocode/src/github.com/mesos/mesos-go/mesosutil (from $GOPATH)
cluster/mesos/cluster.go:23:2: cannot find package “github.com/mesos/mesos-go/scheduler” in any of:
/usr/lib/go/src/pkg/github.com/mesos/mesos-go/scheduler (from $GOROOT)
/home/funlab/gocode/src/github.com/mesos/mesos-go/scheduler (from $GOPATH)
cluster/cluster.go:6:2: cannot find package “github.com/samalba/dockerclient” in any of:
/usr/lib/go/src/pkg/github.com/samalba/dockerclient (from $GOROOT)
/home/funlab/gocode/src/github.com/samalba/dockerclient (from $GOPATH)

After I search for path mentioned in GOROOT I found “github.com” directory and its sub-directories are NOT present in “/usr/lib/go/src/pkg/”

Please help what should I do next.
-Thank you


(Jeanepaul) #2

Greetings,

I think you have not set GOBIN?

export GOBIN=$GOPATH/bin
export PATH=$GOPATH:$GOBIN:$PATH

(Reachchinu) #3

Hi Jeanepaul,
Thank you for your reply. Its working now.

Thank you