Go version
go version go1.23.0 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/eugenekoo/Library/Caches/go-build'
GOENV='/Users/eugenekoo/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/eugenekoo/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/eugenekoo/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.23.0/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.23.0/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/eugenekoo/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/eugenekoo/Documents/Cost-Management/go-test/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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/zb/y3z5bn8s0678hjb4fst040vw0000gn/T/go-build428616844=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
The issue is that I am unable to install the Terraform package into my go project
I have created a new go project, with the intention of running the following command: go get github.com/hashicorp/terraform@v1.9.3
What did you see happen?
$ go get github.com/hashicorp/terraform@v1.9.3
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/azure v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/consul v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/cos v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/gcs v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/kubernetes v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/oss v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/pg v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/terraform/internal/backend/remote-state/s3 v0.0.0-00010101000000-000000000000
go: downloading github.com/hashicorp/go-slug v0.15.0
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0
go: downloading github.com/golang/protobuf v1.5.3
go: downloading cloud.google.com/go v0.110.7
go: downloading google.golang.org/api v0.126.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d
go: downloading google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d
go: downloading github.com/google/uuid v1.3.1
go: downloading github.com/jedib0t/go-pretty/v6 v6.4.4
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/bmatcuk/doublestar v1.1.5
go: downloading cloud.google.com/go/compute v1.23.0
go: downloading cloud.google.com/go/iam v1.1.1
go: downloading github.com/googleapis/gax-go/v2 v2.11.0
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
go: downloading github.com/fsnotify/fsnotify v1.5.4
go: downloading github.com/joho/godotenv v1.3.0
go: downloading github.com/golang-jwt/jwt/v4 v4.4.2
go: downloading github.com/Microsoft/go-winio v0.5.2
go: downloading github.com/google/s2a-go v0.1.4
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.3
go: downloading github.com/rivo/uniseg v0.2.0
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/azure: github.com/hashicorp/terraform/internal/backend/remote-state/azure@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/consul: github.com/hashicorp/terraform/internal/backend/remote-state/consul@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/cos: github.com/hashicorp/terraform/internal/backend/remote-state/cos@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/gcs: github.com/hashicorp/terraform/internal/backend/remote-state/gcs@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/kubernetes: github.com/hashicorp/terraform/internal/backend/remote-state/kubernetes@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/oss: github.com/hashicorp/terraform/internal/backend/remote-state/oss@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/pg: github.com/hashicorp/terraform/internal/backend/remote-state/pg@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
go: github.com/hashicorp/terraform imports
github.com/hashicorp/terraform/internal/backend/init imports
github.com/hashicorp/terraform/internal/backend/remote-state/s3: github.com/hashicorp/terraform/internal/backend/remote-state/s3@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
What did you expect to see?
The output does not install (or update) the terraform module, as it is not able to recognize the versions of the terraform dependencies found here: https://github.com/hashicorp/terraform/blob/e312ffc2d821901e982f897de952944070f74f19/go.mod#L39
The expected output is to have terraform installed properly without fail.
Comment From: gabyhelp
Related Issues and Documentation
- cmd/go: panic when running "go mod vendor" on tip #46659 (closed)
- cmd/go: get panics with "can't find reason for requirement on" #57037 (closed)
- cmd/go: "get -u" stumbles over repos imported via non-canonical paths #30831
- cmd/go: module fetch errors are unclear #26594 (closed)
- cmd/go: unexpected build failure with modules #29887 (closed)
- cmd/go: update x/vgo #26434 (closed)
- go mod why fails to find import graph for github.com/golang/lint #32412 (closed)
- x/vgo: how to deal with kubernetes client-go v6.0.0 #24032 (closed)
- proxy.golang.org doesn't include symlinks #44482 (closed)
- cmd/go: spurious 'package provided […] but not at required version' error #31487 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: seankhliao
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions