英文:
Build kustomize 3.2.0 on Windows
问题
有人能建议如何在Windows上安装3.2.0版本的kustomize吗?
我需要在Windows上安装特定的v3.2.0版本。我正在按照这个教程进行操作。
源代码:https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0
我已经下载了zip文件并安装了Go。但是当我在kustomize文件夹中运行go install .
时,我得到了no Go files in path/kustomize/..
的错误。我也尝试了逐步按照上述教程进行操作,但是出现了相同的错误。
编辑:尝试通过https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh进行安装./install_kustomize.sh 3.2.0
时,我得到了Version v3.2.0 does not exist.
的错误。
当我尝试./install_kustomize.sh 3.2.1
时,我得到了以下错误:
tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
环境:Windows 10,在GIT Bash中执行。
英文:
Can someone suggest how to install 3.2.0 version of kustomize on Windows, please?
I need specifically v3.2.0 on Windows. I am following this tutorial.
Source code: https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0
I downloaded the zip file and installed Go. However when I run go install .
inside that kustomize folder i get: no Go files in path/kustomize/..
Also tried step by step aforementioned tutorial but same error..
EDIT: Trying to install via https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0
I get: Version v3.2.0 does not exist.
When I try ./install_kustomize.sh 3.2.1
I get:
tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Env: Windows 10, executing in GIT Bash
答案1
得分: 1
你需要运行 go install ./cmd/kustomize/
。
这是你想要构建的 main.go 所在的位置。
这将在你的 %GOBIN% 中安装可执行文件。
你可能想要使用 go build -o kustomize.exe ./cmd/kustomize/
,以便将可执行文件放在当前工作目录中。
英文:
You'll need to run go install ./cmd/kustomize/
.
That is where the main.go is you want built.
This will install the executable in your %GOBIN%.
You might want to use go build -o kustomize.exe ./cmd/kustomize/
instead to get the executable in your current working directory.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论