去找不到包裹

时间:2017-08-04 20:41:09

标签: go

我试图检查这个Go项目https://github.com/fabric8io/kubernetes-model并根据自述文件进行构建:

android:paddingBottom="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="8dp"

我不应该对此做什么,因为我已经习惯于构建自动下载依赖项的工具。

编辑:我也尝试过:

> mkdir -p "$HOME/Go/src/github.com/fabric8io"
> export GOPATH="$HOME/Go"
> cd "$HOME/Go/src/github.com/fabric8io"
> git clone https://github.com/fabric8io/kubernetes-model
> cd kubernetes-model
> brew install go
> brew install godep
> make
CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build -a ./cmd/generate/generate.go
cmd/generate/generate.go:27:2: cannot find package "github.com/openshift/origin/pkg/authorization/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/authorization/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/authorization/api/v1 (from $GOPATH)
cmd/generate/generate.go:28:2: cannot find package "github.com/openshift/origin/pkg/build/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/build/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/build/api/v1 (from $GOPATH)
cmd/generate/generate.go:29:2: cannot find package "github.com/openshift/origin/pkg/deploy/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/deploy/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/deploy/api/v1 (from $GOPATH)
cmd/generate/generate.go:30:2: cannot find package "github.com/openshift/origin/pkg/image/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/image/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/image/api/v1 (from $GOPATH)
cmd/generate/generate.go:31:2: cannot find package "github.com/openshift/origin/pkg/oauth/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/oauth/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/oauth/api/v1 (from $GOPATH)
cmd/generate/generate.go:32:2: cannot find package "github.com/openshift/origin/pkg/project/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/project/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/project/api/v1 (from $GOPATH)
cmd/generate/generate.go:33:2: cannot find package "github.com/openshift/origin/pkg/route/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/route/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/route/api/v1 (from $GOPATH)
cmd/generate/generate.go:34:2: cannot find package "github.com/openshift/origin/pkg/template/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/template/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/template/api/v1 (from $GOPATH)
cmd/generate/generate.go:35:2: cannot find package "github.com/openshift/origin/pkg/user/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/openshift/origin/pkg/user/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/github.com/openshift/origin/pkg/user/api/v1 (from $GOPATH)
cmd/generate/generate.go:36:2: cannot find package "k8s.io/apiextensions-server/pkg/apis/apiextensions/v1beta1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/apiextensions-server/pkg/apis/apiextensions/v1beta1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/apiextensions-server/pkg/apis/apiextensions/v1beta1 (from $GOPATH)
cmd/generate/generate.go:37:2: cannot find package "k8s.io/kubernetes/pkg/api/resource" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/api/resource (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/api/resource (from $GOPATH)
cmd/generate/generate.go:38:2: cannot find package "k8s.io/kubernetes/pkg/api/unversioned" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/api/unversioned (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/api/unversioned (from $GOPATH)
cmd/generate/generate.go:39:2: cannot find package "k8s.io/kubernetes/pkg/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/api/v1 (from $GOPATH)
cmd/generate/generate.go:40:2: cannot find package "k8s.io/kubernetes/pkg/apis/apps/v1beta1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/apis/apps/v1beta1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/apis/apps/v1beta1 (from $GOPATH)
cmd/generate/generate.go:41:2: cannot find package "k8s.io/kubernetes/pkg/apis/autoscaling/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/apis/autoscaling/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/apis/autoscaling/v1 (from $GOPATH)
cmd/generate/generate.go:43:2: cannot find package "k8s.io/kubernetes/pkg/apis/batch/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/apis/batch/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/apis/batch/v1 (from $GOPATH)
cmd/generate/generate.go:42:2: cannot find package "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/apis/batch/v2alpha1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/apis/batch/v2alpha1 (from $GOPATH)
cmd/generate/generate.go:44:2: cannot find package "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/apis/extensions/v1beta1 (from $GOPATH)
cmd/generate/generate.go:45:2: cannot find package "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1 (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1 (from $GOPATH)
cmd/generate/generate.go:46:2: cannot find package "k8s.io/kubernetes/pkg/watch/json" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/k8s.io/kubernetes/pkg/watch/json (from $GOROOT)
    /Users/joangoyeau/Code/go/src/k8s.io/kubernetes/pkg/watch/json (from $GOPATH)
make: *** [build] Error 1

1 个答案:

答案 0 :(得分:0)

你应该克隆存储库并为它设置适当的GOPATH 文件夹结构必须是:

kubernetes-model
                \ src
                     \github.com
                                \fabric8io
                                          \kubernetes-model
                                                           \ <project files here>

export GOPATH=<location of first 'kubernetes-model' folder in this chain>

此导出将使vendor

go项目目录可见