-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FATA[0020] failed to initialize project: unable to scaffold with "base.go.kubebuilder.io/v3": exit status 2 #5558
Comments
@al3xandru you may have to bump the go version to 1.17. |
|
As of operator-sdk 1.17 we require go 1.17: https://v1-18-x.sdk.operatorframework.io/docs/installation/#prerequisites-1 |
@VenkatRamaraju will double check the tutorial to make sure we're not stating conflicting information |
Hey, I'm able to run the
My suspicion is that this is some version mismatch. Try the following:
If you are still running into this error, let me know what the output of |
Hi @VenkatRamaraju @al3xandru, I had to run the following command at the beginning, otherwise I received the above mentioned error, too: sudo -s Hopefully somehow helpful. |
HI @tomasfabian, The tool will create/update/read files in the respective directory where you run Then, since you say that execute the command as sudo sorted it out that means you have no permissions in the dir. |
Hi @camilamacedo86,
I was thinking that something else went wrong (go version mismatch etc.). It could be helpful to mention it at least for developers coming from the Windows operating system in the documentation (quick start). Thanks a lot. |
operator-sdk version: "v1.19.0", commit: "728682c347f6335ee2a610e08790a5e1411508f4", kubernetes version: "v1.23", go version: "go1.18", GOOS: "darwin", GOARCH: "amd64" Is an error failed to create API: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 2 |
Hi, I've just run into a similar issue... Environment: Operator-sdk version: Go version: Gcc version: Steps to reproduce on fresh machine:
How reproducible: Result: Could you please help me with this? I've tried to set the: PS: I've also tried to update both operator-sdk and go packages, but they are the newest stable releases. |
@ljavorsk , I am with the same configuration as yours. Managed to workaround the problem by uninstalling go (v 1.18.1) and installing version 1.17.9. |
@nvvalchev How did you force the version of go to be 1.17? Or did you installed different version of operator-sdk? Or you didn't used |
@ljavorsk , I force removed go with brew (as operator-sdk v1.19.1 is dependent on it) and installed go 1.17.9 via brew. Works like charm. The initial go installation v 1.18.1 was performed by brew as transitive dependency of operator-sdk. |
I got the same error, I fixed modifying the makefile, search for this variable and replace it with this: CONTROLLER_GEN=$(GOBIN)/controller-gen
KUSTOMIZE = $(GOBIN)/kustomize
ENVTEST =$(GOBIN)/setup-envtest because previously every cmd had |
@camilamacedo86 can we close this issue? |
Installs via Homebrew should also be fixed as of: Homebrew/homebrew-core@7e5afcb |
GO 1.18 is still not supported; see: kubernetes-sigs/kubebuilder#2559. |
Therefore, I think we can close this one. But feel free to raise new issues if you see that you still need help or face issues. So that you can check your specific scenario. |
First tutorial command fails:
operator-sdk init --domain mypopescu.com --repo github.com/al3xandru/memcached-operator
.The other similar issues suggest an incompatible go version. I made sure the above runs with go 1.16:
Output
The text was updated successfully, but these errors were encountered: