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

v1.9.0 Can't build on go 1.15.14: Download error package io/fs is not in GOROOT #370

Closed
joernott opened this issue Jul 15, 2022 · 2 comments

Comments

@joernott
Copy link

I just tried updating and installing a tool using cobra and viper and I got the following error on a redhat linux 7 using go 1.15.14 from the golang-bin package from EPEL (golang-bin-1.15.14-1):

../../../../go/pkg/mod/github.com/spf13/afero@v1.9.0/basepath.go:4:2: package io/fs is not in GOROOT (/usr/lib/golang/src/io/fs)

Updating to golang 1.16.13 or 1.17.10 from epel solves the problem for me. I had no problems on Windows with 1.16 to 1.18 (sadly, I had no Windows with 1.15 available)

@jxsl13
Copy link

jxsl13 commented Jul 15, 2022

The problem is that io/fs was introduced in go 1.16, meaning you need to update your lowest supported Go version to 1.16.

It is to be expected and not really a bug in that sense.

@joernott
Copy link
Author

OK, I just wanted to make sure, that this was not an accident, as this also impacts cobra and viper. A minimal version of 1.16 is quite reasonable, so I'll close this ticket.

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

No branches or pull requests

2 participants