TencentBlueKing / bk-bcs

蓝鲸智云容器管理平台(BlueKing Container Service)
http://bk.tencent.com
Other
786 stars 251 forks source link

[Question]版本依赖下载失败 #440

Closed yang-wj closed 4 years ago

yang-wj commented 4 years ago

feature相关背景与描述 社区版5.1.26已经单机部署在Centos7.2上,可以访问使用,现在想在上面集成一下容器平台,安装https://gitee.com/Tencent-BlueKing/bk-bcs/blob/master/docs/install/source_compile.md上面执行时,在dep ensure -v 提示 unable to deduce repository and source type for "cloud.google.com/go": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://cloud.google.com/go?go-get=1": Get http://cloud.google.com/go?go-get=1: 我通过git clone https://github.com/googleapis/google-cloud-go.git 将文件夹命名为go后放在指定目录,然后执行make -j时又报一堆错误。 git tag: 95388de mkdir -p ./build/bcs.95388de-20.04.26 mkdir -p ./build/api_export go fmt ./... cd ./scripts && chmod +x vet.sh && ./vet.sh go vet ../../github.com/prometheus/client_model/go/metrics.pb.go:8:2: cannot find package "github.com/golang/protobuf/proto" in any of: /usr/lib/golang/src/github.com/golang/protobuf/proto (from $GOROOT) /data/workspace/src/github.com/golang/protobuf/proto (from $GOPATH) ../../github.com/prometheus/client_model/go/metrics.pb.go:9:2: cannot find package "github.com/golang/protobuf/ptypes/timestamp" in any of: /usr/lib/golang/src/github.com/golang/protobuf/ptypes/timestamp (from $GOROOT) /data/workspace/src/github.com/golang/protobuf/ptypes/timestamp (from $GOPATH) ../vendor/github.com/prometheus/client_golang/prometheus/http.go:27:2: cannot find package "github.com/prometheus/common/expfmt" in any of: /data/workspace/src/bk-bcs/vendor/github.com/prometheus/common/expfmt (vendor tree) /usr/lib/golang/src/github.com/prometheus/common/expfmt (from $GOROOT) /data/workspace/src/github.com/prometheus/common/expfmt (from $GOPATH) ../vendor/github.com/prometheus/client_golang/prometheus/desc.go:23:2: cannot find package "github.com/prometheus/common/model" in any of: /data/workspace/src/bk-bcs/vendor/github.com/prometheus/common/model (vendor tree) /usr/lib/golang/src/github.com/prometheus/common/model (from $GOROOT) /data/workspace/src/github.com/prometheus/common/model (from $GOPATH) ../bcs-common/common/mysqlclient/mysqlclient.go:21:2: cannot find package "github.com/go-sql-driver/mysql" in any of: /data/workspace/src/bk-bcs/vendor/github.com/go-sql-driver/mysql (vendor tree) /usr/lib/golang/src/github.com/go-sql-driver/mysql (from $GOROOT) /data/workspace/src/github.com/go-sql-driver/mysql (from $GOPATH) ../vendor/k8s.io/apimachinery/pkg/util/diff/diff.go:28:2: cannot find package "github.com/davecgh/go-spew/spew" in any of: /data/workspace/src/bk-bcs/vendor/github.com/davecgh/go-spew/spew (vendor tree) /usr/lib/golang/src/github.com/davecgh/go-spew/spew (from $GOROOT) /data/workspace/src/github.com/davecgh/go-spew/spew (from $GOPATH) ../vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go:25:2: cannot find package "github.com/ghodss/yaml" in any of: /data/workspace/src/bk-bcs/vendor/github.com/ghodss/yaml (vendor tree) /usr/lib/golang/src/github.com/ghodss/yaml (from $GOROOT) /data/workspace/src/github.com/ghodss/yaml (from $GOPATH) ../vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go:70:8: cannot find package "github.com/gogo/protobuf/proto" in any of: /data/workspace/src/bk-bcs/vendor/github.com/gogo/protobuf/proto (vendor tree) /usr/lib/golang/src/github.com/gogo/protobuf/proto (from $GOROOT) /data/workspace/src/github.com/gogo/protobuf/proto (from $GOPATH) ../vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go:79:8: cannot find package "github.com/gogo/protobuf/sortkeys" in any of: /data/workspace/src/bk-bcs/vendor/github.com/gogo/protobuf/sortkeys (vendor tree) /usr/lib/golang/src/github.com/gogo/protobuf/sortkeys (from $GOROOT) /data/workspace/src/github.com/gogo/protobuf/sortkeys (from $GOPATH) ../vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go:23:2: cannot find package "github.com/hashicorp/golang-lru" in any of: /data/workspace/src/bk-bcs/vendor/github.com/hashicorp/golang-lru (vendor tree) /usr/lib/golang/src/github.com/hashicorp/golang-lru (from $GOROOT) /data/workspace/src/github.com/hashicorp/golang-lru (from $GOPATH) ../vendor/github.com/json-iterator/go/config.go:10:2: cannot find package "github.com/modern-go/concurrent" in any of: /data/workspace/src/bk-bcs/vendor/github.com/modern-go/concurrent (vendor tree) /usr/lib/golang/src/github.com/modern-go/concurrent (from $GOROOT) /data/workspace/src/github.com/modern-go/concurrent (from $GOPATH) ../vendor/github.com/json-iterator/go/any.go:6:2: cannot find package "github.com/modern-go/reflect2" in any of: /data/workspace/src/bk-bcs/vendor/github.com/modern-go/reflect2 (vendor tree) /usr/lib/golang/src/github.com/modern-go/reflect2 (from $GOROOT) /data/workspace/src/github.com/modern-go/reflect2 (from $GOPATH) ../vendor/github.com/coreos/etcd/auth/authpb/auth.pb.go:24:2: cannot find package "github.com/gogo/protobuf/gogoproto" in any of: /data/workspace/src/bk-bcs/vendor/github.com/gogo/protobuf/gogoproto (vendor tree) /usr/lib/golang/src/github.com/gogo/protobuf/gogoproto (from $GOROOT) /data/workspace/src/github.com/gogo/protobuf/gogoproto (from $GOPATH) ../vendor/k8s.io/client-go/discovery/cached_discovery.go:29:2: cannot find package "github.com/googleapis/gnostic/OpenAPIv2" in any of: /data/workspace/src/bk-bcs/vendor/github.com/googleapis/gnostic/OpenAPIv2 (vendor tree) /usr/lib/golang/src/github.com/googleapis/gnostic/OpenAPIv2 (from $GOROOT) /data/workspace/src/github.com/googleapis/gnostic/OpenAPIv2 (from $GOPATH) ../vendor/github.com/spf13/viper/viper.go:39:2: cannot find package "github.com/hashicorp/hcl" in any of: /data/workspace/src/bk-bcs/vendor/github.com/hashicorp/hcl (vendor tree) /usr/lib/golang/src/github.com/hashicorp/hcl (from $GOROOT) /data/workspace/src/github.com/hashicorp/hcl (from $GOPATH) ../vendor/github.com/spf13/viper/viper.go:40:2: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of: /data/workspace/src/bk-bcs/vendor/github.com/hashicorp/hcl/hcl/printer (vendor tree) /usr/lib/golang/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT) /data/workspace/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH) ../vendor/github.com/spf13/viper/util.go:21:2: cannot find package "github.com/spf13/afero" in any of: /data/workspace/src/bk-bcs/vendor/github.com/spf13/afero (vendor tree) /usr/lib/golang/src/github.com/spf13/afero (from $GOROOT) /data/workspace/src/github.com/spf13/afero (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/internal/jsonmessage/jsonmessage.go:15:2: cannot find package "github.com/Nvveen/Gotty" in any of: /data/workspace/src/bk-bcs/vendor/github.com/Nvveen/Gotty (vendor tree) /usr/lib/golang/src/github.com/Nvveen/Gotty (from $GOROOT) /data/workspace/src/github.com/Nvveen/Gotty (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/distribution.go:10:2: cannot find package "github.com/docker/docker/api/types/registry" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/api/types/registry (vendor tree) /usr/lib/golang/src/github.com/docker/docker/api/types/registry (from $GOROOT) /data/workspace/src/github.com/docker/docker/api/types/registry (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/misc.go:13:2: cannot find package "github.com/docker/docker/api/types/swarm" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/api/types/swarm (vendor tree) /usr/lib/golang/src/github.com/docker/docker/api/types/swarm (from $GOROOT) /data/workspace/src/github.com/docker/docker/api/types/swarm (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/client.go:34:2: cannot find package "github.com/docker/docker/opts" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/opts (vendor tree) /usr/lib/golang/src/github.com/docker/docker/opts (from $GOROOT) /data/workspace/src/github.com/docker/docker/opts (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/tar.go:16:2: cannot find package "github.com/docker/docker/pkg/fileutils" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/fileutils (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/fileutils (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/fileutils (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/client.go:35:2: cannot find package "github.com/docker/docker/pkg/homedir" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/homedir (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/homedir (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/homedir (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go:18:2: cannot find package "github.com/docker/docker/pkg/idtools" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/idtools (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/idtools (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/idtools (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go:19:2: cannot find package "github.com/docker/docker/pkg/pools" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/pools (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/pools (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/pools (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/client.go:36:2: cannot find package "github.com/docker/docker/pkg/stdcopy" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/stdcopy (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/stdcopy (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/stdcopy (from $GOPATH) ../vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go:20:2: cannot find package "github.com/docker/docker/pkg/system" in any of: /data/workspace/src/bk-bcs/vendor/github.com/docker/docker/pkg/system (vendor tree) /usr/lib/golang/src/github.com/docker/docker/pkg/system (from $GOROOT) /data/workspace/src/github.com/docker/docker/pkg/system (from $GOPATH) ../vendor/gopkg.in/go-playground/validator.v9/baked_in.go:8:2: cannot find package "github.com/leodido/go-urn" in any of: /data/workspace/src/bk-bcs/vendor/github.com/leodido/go-urn (vendor tree) /usr/lib/golang/src/github.com/leodido/go-urn (from $GOROOT) /data/workspace/src/github.com/leodido/go-urn (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/setup.go:31:2: cannot find package "github.com/coredns/coredns/core/dnsserver" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/core/dnsserver (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/core/dnsserver (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/core/dnsserver (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/bcscustom.go:17:2: cannot find package "github.com/coredns/coredns/plugin" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/bcscustom.go:18:2: cannot find package "github.com/coredns/coredns/plugin/etcd" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/etcd (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/etcd (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/etcd (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/bcscustom.go:19:2: cannot find package "github.com/coredns/coredns/plugin/etcd/msg" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/etcd/msg (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/etcd/msg (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/etcd/msg (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/setup.go:34:2: cannot find package "github.com/coredns/coredns/plugin/metrics" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/metrics (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/metrics (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/metrics (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/setup.go:35:2: cannot find package "github.com/coredns/coredns/plugin/pkg/fall" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/fall (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/fall (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/fall (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/setup.go:36:2: cannot find package "github.com/coredns/coredns/plugin/pkg/tls" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/tls (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/tls (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/tls (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/bcscustom.go:22:2: cannot find package "github.com/coredns/coredns/plugin/pkg/upstream" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/upstream (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/upstream (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/upstream (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/setup.go:38:2: cannot find package "github.com/coredns/coredns/plugin/proxy" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/proxy (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/proxy (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/proxy (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcscustom/bcscustom.go:20:2: cannot find package "github.com/coredns/coredns/request" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/request (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/request (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/request (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcsscheduler/scheduler.go:39:2: cannot find package "github.com/coredns/coredns/plugin/pkg/dnsutil" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/dnsutil (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/dnsutil (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/dnsutil (from $GOPATH) ../bcs-services/bcs-dns/plugin/bcsscheduler/setup.go:27:2: cannot find package "github.com/coredns/coredns/plugin/pkg/parse" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/parse (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/parse (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/parse (from $GOPATH) ../bcs-services/bcs-dns/plugin/log/log.go:23:2: cannot find package "github.com/coredns/coredns/plugin/metrics/vars" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/metrics/vars (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/metrics/vars (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/metrics/vars (from $GOPATH) ../bcs-services/bcs-dns/plugin/log/log.go:24:2: cannot find package "github.com/coredns/coredns/plugin/pkg/dnstest" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/dnstest (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/dnstest (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/dnstest (from $GOPATH) ../bcs-services/bcs-dns/plugin/log/log.go:25:2: cannot find package "github.com/coredns/coredns/plugin/pkg/rcode" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/rcode (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/rcode (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/rcode (from $GOPATH) ../bcs-services/bcs-dns/plugin/log/log.go:26:2: cannot find package "github.com/coredns/coredns/plugin/pkg/replacer" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/replacer (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/replacer (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/replacer (from $GOPATH) ../bcs-services/bcs-dns/plugin/log/log.go:27:2: cannot find package "github.com/coredns/coredns/plugin/pkg/response" in any of: /data/workspace/src/bk-bcs/vendor/github.com/coredns/coredns/plugin/pkg/response (vendor tree) /usr/lib/golang/src/github.com/coredns/coredns/plugin/pkg/response (from $GOROOT) /data/workspace/src/github.com/coredns/coredns/plugin/pkg/response (from $GOPATH) ../vendor/github.com/elastic/beats/libbeat/common/config.go:15:2: cannot find package "github.com/elastic/go-ucfg" in any of: /data/workspace/src/bk-bcs/vendor/github.com/elastic/go-ucfg (vendor tree) /usr/lib/golang/src/github.com/elastic/go-ucfg (from $GOROOT) /data/workspace/src/github.com/elastic/go-ucfg (from $GOPATH) ../vendor/github.com/elastic/beats/libbeat/common/config.go:16:2: cannot find package "github.com/elastic/go-ucfg/cfgutil" in any of: /data/workspace/src/bk-bcs/vendor/github.com/elastic/go-ucfg/cfgutil (vendor tree) /usr/lib/golang/src/github.com/elastic/go-ucfg/cfgutil (from $GOROOT) /data/workspace/src/github.com/elastic/go-ucfg/cfgutil (from $GOPATH) ../vendor/github.com/elastic/beats/libbeat/common/config.go:17:2: cannot find package "github.com/elastic/go-ucfg/flag" in any of: /data/workspace/src/bk-bcs/vendor/github.com/elastic/go-ucfg/flag (vendor tree) /usr/lib/golang/src/github.com/elastic/go-ucfg/flag (from $GOROOT) /data/workspace/src/github.com/elastic/go-ucfg/flag (from $GOPATH) ../vendor/github.com/elastic/beats/libbeat/common/config.go:18:2: cannot find package "github.com/elastic/go-ucfg/yaml" in any of: /data/workspace/src/bk-bcs/vendor/github.com/elastic/go-ucfg/yaml (vendor tree) /usr/lib/golang/src/github.com/elastic/go-ucfg/yaml (from $GOROOT) /data/workspace/src/github.com/elastic/go-ucfg/yaml (from $GOPATH) make: *** [pre] Error 1

解决方案描述 (你所选择的方案详细描述)

其他可行性方案分析 (分析你已经考虑过的其他可行性方案,方案对比优劣等)

其他补充信息 是基础环境问题吗 有没有好的解决方案?

DeveloperJim commented 4 years ago

该问题主要是dep ensure -v进行依赖处理时因为域名cloud.google.com/go处理中断,导致没有完整处理所有依赖,肯定是无法完成编译的。 因为项目依赖较多,其实不建议手动补充依赖项目,因为部分项目有特定版本依赖。 建议处理方式:使用代理,完成dep ensure -v,因为部分google域名国内可能无法正常访问

因为法务的问题,部分依赖的第三方组件我们不能包含在项目中。 如果确实无法进行代理,可以联系我们,我们独立提供依赖包。QQ群:495299374

DeveloperJim commented 4 years ago

/close