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

Go module error: package xxx/xxx/xxx is not in GOROOT (/usr/local/opt/go/libexec/src/xxx/xxx/xxx) #58374

Closed
faizanbashir opened this issue Feb 7, 2023 · 3 comments
Labels
FrozenDueToAge GoCommand cmd/go WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@faizanbashir
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.20 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/usr/local/opt/go/libexec/bin"
GOCACHE="/Users/telifaizan/Library/Caches/go-build"
GOENV="/Users/telifaizan/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/telifaizan/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/telifaizan/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/telifaizan/Code/honeywell/global/aro/sceptre/src/production/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bk/wd5r4jxs79d4fyb1psw_zl_00000gn/T/go-build2284511460=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I was running version 1.19.3, but I have recently upgraded to 1.20. After getting the error, I tried to revert to 1.19.3, but the error persisted.

What did you expect to see?

The application was running a couple of hours ago. But now its giving errors.

What did you see instead?

internal/orchestrator/kubernetes.go:10:2: package sceptre/internal/helper is not in GOROOT (/usr/local/opt/go/libexec/src/sceptre/internal/helper)

@bcmills
Copy link
Contributor

bcmills commented Feb 7, 2023

What did you do?

More detail, please.

  • What commands did you run?
  • What directory were you in? (Is in the same directory in which you ran go env?)
  • What version of what module were you working with?
    • Where did you expect the package sceptre/internal/helper to be found? (Do you have a module named sceptre in your module dependencies somewhere?)

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. GoCommand cmd/go labels Feb 7, 2023
@jcervantes-genially
Copy link

jcervantes-genially commented Feb 10, 2023

I have same problem. With go 1.19 was working my code, now I got same error.

My env:

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/xxx/Library/Caches/go-build"
GOENV="/Users/xxx/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/xxx/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/xxx/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/xxx/Sites/name_project/go.mod"
GOWORK="/Users/xxx/Sites/name_project/go.work"
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_z/gm3hbx9d3bq3hwxrzn1j2pc80000gn/T/go-build257456555=/tmp/go-build -gno-record-gcc-switches -fno-common" 

My go.mod:

module name_project

go 1.19

require (
	github.com/gin-gonic/gin v1.8.2
	github.com/go-sql-driver/mysql v1.7.0
	golang.org/x/oauth2 v0.5.0
	google.golang.org/api v0.109.0
)

require (
	cloud.google.com/go/compute v1.14.0 // indirect
	cloud.google.com/go/compute/metadata v0.2.3 // indirect
	github.com/gin-contrib/sse v0.1.0 // indirect
	github.com/go-playground/locales v0.14.0 // indirect
	github.com/go-playground/universal-translator v0.18.0 // indirect
	github.com/go-playground/validator/v10 v10.11.1 // indirect
	github.com/goccy/go-json v0.9.11 // indirect
	github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
	github.com/golang/protobuf v1.5.2 // indirect
	github.com/google/uuid v1.3.0 // indirect
	github.com/googleapis/enterprise-certificate-proxy v0.2.1 // indirect
	github.com/googleapis/gax-go/v2 v2.7.0 // indirect
	github.com/json-iterator/go v1.1.12 // indirect
	github.com/leodido/go-urn v1.2.1 // indirect
	github.com/mattn/go-isatty v0.0.16 // indirect
	github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
	github.com/modern-go/reflect2 v1.0.2 // indirect
	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
	github.com/ugorji/go/codec v1.2.7 // indirect
	go.opencensus.io v0.24.0 // indirect
	golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
	golang.org/x/net v0.6.0 // indirect
	golang.org/x/sys v0.5.0 // indirect
	golang.org/x/text v0.7.0 // indirect
	google.golang.org/appengine v1.6.7 // indirect
	google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
	google.golang.org/grpc v1.51.0 // indirect
	google.golang.org/protobuf v1.28.1 // indirect
	gopkg.in/yaml.v2 v2.4.0 // indirect
)

My go.work:

go 1.20

I deleted my go.work and my program run...

@faizanbashir
Copy link
Author

What did you do?

More detail, please.

  • What commands did you run?

  • What directory were you in? (Is in the same directory in which you ran go env?)

  • What version of what module were you working with?

    • Where did you expect the package sceptre/internal/helper to be found? (Do you have a module named sceptre in your module dependencies somewhere?)

Apologies, the issue was on my side. The correct package name was sceptre/internal/utils. The file name was helper.go jumbled up the two. Things are running fine after I used the proper package name.

@golang golang locked and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants