ubuntu编译k8s时报错,安装 gcc g++即可解决如下报错。

vendor/github.com/mindprince/gonvml/bindings.go:22:10: fatal error: dlfcn.h: No such file or directory
   22 | #include <dlfcn.h>
      |          ^~~~~~~~~
compilation terminated.
!!! [1227 16:31:38] Call tree:
!!! [1227 16:31:38]  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:734 kube::golang::build_some_binaries(...)
!!! [1227 16:31:38]  2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:878 kube::golang::build_binaries_for_platform(...)
!!! [1227 16:31:38]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1227 16:31:38] Call tree:
!!! [1227 16:31:38]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1227 16:31:38] Call tree:
!!! [1227 16:31:38]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐