Codis make go build -i -o bin/codis-dashboard ./cmd/dashboard失败
1.在/opt/gowork/src/github.com/CodisLabs/codis下执行make命令,报错
make -j4 -C extern/redis-3.2.11/
make[1]: Entering directory /opt/gowork/src/github.com/CodisLabs/codis/extern/redis-3.2.11' cd src && make all make[2]: Entering directory /opt/gowork/src/github.com/CodisLabs/codis/extern/redis-3.2.11/src'
Hint: It's a good idea to run 'make test' ;)
make[2]: Leaving directory /opt/gowork/src/github.com/CodisLabs/codis/extern/redis-3.2.11/src' make[1]: Leaving directory /opt/gowork/src/github.com/CodisLabs/codis/extern/redis-3.2.11'
fatal: Not a git repository (or any of the parent directories): .git
go build -i -o bin/codis-dashboard ./cmd/dashboard
pkg/topom/config.go:9:2: cannot find package "github.com/BurntSushi/toml" in any of:
/usr/local/go/src/github.com/BurntSushi/toml (from $GOROOT)
/opt/gowork/src/github.com/BurntSushi/toml (from $GOPATH)
pkg/models/etcd/etcdclient.go:13:2: cannot find package "github.com/coreos/etcd/client" in any of:
/usr/local/go/src/github.com/coreos/etcd/client (from $GOROOT)
/opt/gowork/src/github.com/coreos/etcd/client (from $GOPATH)
cmd/dashboard/main.go:17:2: cannot find package "github.com/docopt/docopt-go" in any of:
/usr/local/go/src/github.com/docopt/docopt-go (from $GOROOT)
/opt/gowork/src/github.com/docopt/docopt-go (from $GOPATH)
pkg/topom/topom_slots.go:10:2: cannot find package "github.com/emirpasic/gods/trees/redblacktree" in any of:
/usr/local/go/src/github.com/emirpasic/gods/trees/redblacktree (from $GOROOT)
/opt/gowork/src/github.com/emirpasic/gods/trees/redblacktree (from $GOPATH)
pkg/utils/redis/client.go:17:2: cannot find package "github.com/garyburd/redigo/redis" in any of:
/usr/local/go/src/github.com/garyburd/redigo/redis (from $GOROOT)
/opt/gowork/src/github.com/garyburd/redigo/redis (from $GOPATH)
pkg/proxy/proxy_api.go:14:2: cannot find package "github.com/go-martini/martini" in any of:
/usr/local/go/src/github.com/go-martini/martini (from $GOROOT)
/opt/gowork/src/github.com/go-martini/martini (from $GOPATH)
pkg/proxy/metrics.go:10:2: cannot find package "github.com/influxdata/influxdb/client/v2" in any of:
/usr/local/go/src/github.com/influxdata/influxdb/client/v2 (from $GOROOT)
/opt/gowork/src/github.com/influxdata/influxdb/client/v2 (from $GOPATH)
pkg/proxy/proxy_api.go:15:2: cannot find package "github.com/martini-contrib/binding" in any of:
/usr/local/go/src/github.com/martini-contrib/binding (from $GOROOT)
/opt/gowork/src/github.com/martini-contrib/binding (from $GOPATH)
pkg/proxy/proxy_api.go:16:2: cannot find package "github.com/martini-contrib/gzip" in any of:
/usr/local/go/src/github.com/martini-contrib/gzip (from $GOROOT)
/opt/gowork/src/github.com/martini-contrib/gzip (from $GOPATH)
pkg/proxy/proxy_api.go:17:2: cannot find package "github.com/martini-contrib/render" in any of:
/usr/local/go/src/github.com/martini-contrib/render (from $GOROOT)
/opt/gowork/src/github.com/martini-contrib/render (from $GOPATH)
pkg/models/zk/zkclient.go:14:2: cannot find package "github.com/samuel/go-zookeeper/zk" in any of:
/usr/local/go/src/github.com/samuel/go-zookeeper/zk (from $GOROOT)
/opt/gowork/src/github.com/samuel/go-zookeeper/zk (from $GOPATH)
pkg/models/etcd/etcdclient.go:11:2: cannot find package "golang.org/x/net/context" in any of:
/usr/local/go/src/golang.org/x/net/context (from $GOROOT)
/opt/gowork/src/golang.org/x/net/context (from $GOPATH)
pkg/proxy/metrics.go:11:2: cannot find package "gopkg.in/alexcesaro/statsd.v2" in any of:
/usr/local/go/src/gopkg.in/alexcesaro/statsd.v2 (from $GOROOT)
/opt/gowork/src/gopkg.in/alexcesaro/statsd.v2 (from $GOPATH)
make: *** [codis-dashboard] Error 1
2.我的go path环境变量配置为: export GOROOT=/usr/local/go export GOBIN=$GOROOT/bin export GOPATH=/opt/gowork export PATH=$PATH:$GOBIN:$GOPATH