Skip to content
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

"ko and go have mismatched GOROOT" error when trying ko commands. #432

Closed
mayuchau opened this issue Sep 8, 2021 · 1 comment · Fixed by #439
Closed

"ko and go have mismatched GOROOT" error when trying ko commands. #432

mayuchau opened this issue Sep 8, 2021 · 1 comment · Fixed by #439

Comments

@mayuchau
Copy link

mayuchau commented Sep 8, 2021

Hello,
I am referring this document to build knative-serving to get images from source code.
https://github.com/knative/serving/blob/main/DEVELOPMENT.md

I have configured go, ko tools properly.

$ go version
go version go1.17 linux/amd64

$ ko version
0.8.3

In the Deploy knative-serving stage when I am trying below ko command

ko apply --selector knative.dev/crd-install=true -Rf config/core/

after waiting for more than 10 mins I am seeing below error message.

$ ko apply --selector knative.dev/crd-install=true -Rf config/core/

2021/09/06 05:13:23 NOTICE!
ko and go have mismatched GOROOT:
go/build.Default.GOROOT = "go"
$(go env GOROOT) = "/usr/local/go"

Inferring GOROOT="/usr/local/go"

Run this to remove this warning:
export GOROOT=$(go env GOROOT)

For more information see:
google/ko#106
2021/09/06 05:13:23 No matching credentials were found, falling back on anonymous
customresourcedefinition.apiextensions.k8s.io/images.caching.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/certificates.networking.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/configurations.serving.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/clusterdomainclaims.networking.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/domainmappings.serving.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/ingresses.networking.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/metrics.autoscaling.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/podautoscalers.autoscaling.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/revisions.serving.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/routes.serving.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/serverlessservices.networking.internal.knative.dev unchanged
customresourcedefinition.apiextensions.k8s.io/services.serving.knative.dev unchanged
[mayuchau@phoenix61861 serving]$ export GOROOT=$(go env GOROOT)
[mayuchau@phoenix61861 serving]$ ko apply --selector knative.dev/crd-install=true -Rf config/core/
`

as per the recommendation I am exporting GOROOT but again I am seeing same issue.

export GOROOT=$(go env GOROOT)

I have asked this question to knative-serving team as well.
reference: knative/serving#11900 (comment)

@rakyll
Copy link

rakyll commented Sep 11, 2021

I think this is related to/a duplicate of #305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants