kubernetes安装在本地mesos集群上

xhv8bpkk  于 2021-06-21  发布在  Mesos
关注(0)|答案(1)|浏览(435)

我已经使用vagrant(ubuntu示例)在mac上建立了一个mesos集群,现在我正试图按照kubernetes下面链接上的说明安装kubernetes
但是当我运行make时,我总是得到一个***[all]错误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
wlsrxk51

wlsrxk511#

看起来你在ubuntuguest中安装了一个旧版本的go。更新至1.4.2并重试。

相关问题