我正在尝试出口操作员根据域限制出口呼叫。我正在使用 Hyper-V VM,并且我具有所有先决条件:Ubuntu 18
用于推送映像的 Azure 存储库
Kubebuilder
用于代码生成
Kustomize
用于构建库伯内特清单
CoreDns
(默认使用 k3s) 容器正在运行
Golang
:go version go1.16.5 linux/amd64
但是,虽然本地测试给出了以下错误:make run
root@Ubuntu18-Virtual-Machine:~/egress-operator# make run
go: creating new go.mod: module tmp
go get: added sigs.k8s.io/controller-tools v0.2.4
/root/go/bin/controller-gen object:headerFile=./hack/boilerplate.go.txt paths="./..."
Error: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags ignore_autogenerated -- ./...]: exit status 2: # runtime/cgo
cgo: exec gcc: exec: "gcc": executable file not found in $PATH
此外,在配置映射中编辑核心部署和核心文件后,如核心插件设置中所述,我在执行make deploy命令时看到打击错误:
root@Ubuntu18-Virtual-Machine:~/egress-operator# make deploy IMG=MY_REPO/egress-operator:v0.1
go: creating new go.mod: module tmp
go get: added sigs.k8s.io/controller-tools v0.2.4
/root/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
Error: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags ignore_autogenerated -- ./...]: exit status 2: # runtime/cgo
cgo: exec gcc: exec: "gcc": executable file not found in $PATH
有人可以让我知道如何解决这个问题吗?
梦里花落0921
相关分类