Kubernetes安装在本地Mesos集群上

时间:2015-07-31 17:05:32

标签: makefile vagrant mesos kubernetes

我已经使用Vagrant(Ubuntu实例)在我的Mac上设置了一个Mesos群集,现在我正按照以下链接中的说明尝试安装Kubernetes Kubernetes

但是当我运行make时,我一直得到*** [全部]错误1。看输出我看到几个错误,但我不知道我错过了什么。我使用sudo运行make但似乎没有任何工作。以下是输出:

vagrant@master1:~/kubernetes$ make
hack/build-go.sh 
+++ [0731 15:52:26] Building go targets for linux/amd64:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/kubelet
    cmd/hyperkube
    cmd/kubernetes
    cmd/linkcheck
    plugin/cmd/kube-scheduler
    cmd/kubectl
    cmd/integration
    cmd/gendocs
    cmd/genman
    cmd/mungedocs
    cmd/genbashcomp
    cmd/genconversion
    cmd/gendeepcopy
    examples/k8petstore/web-server
    github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
+++ [0731 15:52:26] +++ Warning: stdlib pkg with cgo flag not found.
+++ [0731 15:52:26] +++ Warning: stdlib pkg cannot be rebuilt since /usr/lib/go/pkg is not writable by vagrant
+++ [0731 15:52:26] +++ Warning: Make /usr/lib/go/pkg writable for vagrant for a one-time stdlib install, Or
+++ [0731 15:52:26] +++ Warning: Rebuild stdlib using the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std'
+++ [0731 15:52:26] +++ Falling back to go build, which is slower
    # github.com/prometheus/client_golang/model
Godeps/_workspace/src/github.com/prometheus/client_golang/model/signature.go:32: undefined: sync.Pool
# github.com/GoogleCloudPlatform/kubernetes/pkg/probe/http
_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/probe/http/http.go:47: unknown http.Client field 'Timeout' in struct literal
# github.com/ugorji/go/codec
Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go:533: undefined: sync.Pool
Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go:1219: undefined: sync.Pool
# github.com/mesos/mesos-go/detector
Godeps/_workspace/src/github.com/mesos/mesos-go/detector/standalone.go:73: unknown http.Client field 'Timeout' in struct literal
go build github.com/GoogleCloudPlatform/kubernetes/pkg/ui/data/swagger: signal: killed
# github.com/fsouza/go-dockerclient/vendor/github.com/docker/docker/pkg/pools
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/vendor/github.com/docker/docker/pkg/pools/pools.go:30: undefined: sync.Pool
!!! Error in /home/vagrant/kubernetes/hack/lib/golang.sh:371
  'CGO_ENABLED=0 go build -o "${outfile}" "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${binary}"' exited with status 2
Call stack:
  1: /home/vagrant/kubernetes/hack/lib/golang.sh:371 kube::golang::build_binaries_for_platform(...)
  2: /home/vagrant/kubernetes/hack/lib/golang.sh:527 kube::golang::build_binaries(...)
  3: hack/build-go.sh:26 main(...)
Exiting with status 1
!!! Error in /home/vagrant/kubernetes/hack/lib/golang.sh:445
  '( kube::golang::setup_env; local version_ldflags; version_ldflags=$(kube::version::ldflags); local host_platform; host_platform=$(kube::golang::host_platform); local goflags; eval "goflags=(${KUBE_GOFLAGS:-})"; local use_go_build; local -a targets=(); local arg; for arg in "$@";
do
    if [[ "${arg}" == "--use_go_build" ]]; then
        use_go_build=true;
    else
        if [[ "${arg}" == -* ]]; then
            goflags+=("${arg}");
        else
            targets+=("${arg}");
        fi;
    fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
    targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}"); if [[ ${#platforms[@]} -eq 0 ]]; then
    platforms=("${host_platform}");
fi; local binaries; binaries=($(kube::golang::binaries_from_targets "${targets[@]}")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then
    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -ge ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
        kube::log::status "Multiple platforms requested and available ${gigs}G >= threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
    else
        kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
    fi;
fi; if [[ "${parallel}" == "true" ]]; then
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
    do
        ( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform//\//_}.build" &
    done; local fails=0; for job in $(jobs -p);
    do
        wait ${job} || let "fails+=1";
    done; for platform in "${platforms[@]}";
    do
        cat "/tmp//${platform//\//_}.build";
    done; exit ${fails};
else
    for platform in "${platforms[@]}";
    do
        kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
    done;
fi )' exited with status 1
Call stack:
  1: /home/vagrant/kubernetes/hack/lib/golang.sh:445 kube::golang::build_binaries(...)
  2: hack/build-go.sh:26 main(...)
Exiting with status 1
make: *** [all] Error 1

1 个答案:

答案 0 :(得分:0)

您似乎在Ubuntu guest中安装了旧版本的Go。更新转至1.4.2并重试。