hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

[Bug]: Error running make tools in Mac #38899

Open gagan-bhullar-tech opened 2 months ago

gagan-bhullar-tech commented 2 months ago

Terraform Core Version

1.9.4

AWS Provider Version

latest

Affected Resource(s)

Trying to set up development environment.

Go version installed - 1.22.6

Running make tools command and it fails with this error.

make: go1.22.6 not found
make: installing go1.22.6...
make: if you get an error, see https://go.dev/doc/manage-install to locally install various Go versions
/bin/bash: go1.22.6: command not found
make: go1.22.6 ready
make: Installing tools...
cd .ci/providerlint && go1.22.6 install .
/bin/bash: go1.22.6: command not found
make: *** [tools] Error 127

Expected Behavior

It should execute without error

Actual Behavior

It should execute without error

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

NA

Steps to Reproduce

In mac install go, terraform and run make tools command

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 2 months ago

Hey @gagan-bhullar-tech 👋 Thank you for taking the time to raise this! I attempted to reproduce this, but wasn't able to:

$ make tools
make: go1.22.6 not found
make: installing go1.22.6...
make: if you get an error, see https://go.dev/doc/manage-install to locally install various Go versions
go: downloading golang.org/dl v0.0.0-20240813161640-304e16060ce9
Downloaded   0.0% (    3121 / 67301095 bytes) ...
Downloaded   0.2% (  114688 / 67301095 bytes) ...
Downloaded  35.9% (24133456 / 67301095 bytes) ...
Downloaded  70.6% (47529056 / 67301095 bytes) ...
Downloaded 100.0% (67301095 / 67301095 bytes)
Unpacking /Users/justinretzolk/sdk/go1.22.6/go1.22.6.darwin-arm64.tar.gz ...
Success. You may now run 'go1.22.6'
make: go1.22.6 ready
make: Installing tools...
cd .ci/providerlint && go1.22.6 install .
# ...
# omitted for brevity
# ...

You may need to manually install the appropriate Go version following the linked guide.

gagan-bhullar-tech commented 2 months ago

thanks @justinretzolk. Will try reinstalling go.

rgee0 commented 3 weeks ago

I was seeing the same:

make: go1.23.2 not found
make: installing go1.23.2...
make: if you get an error, see https://go.dev/doc/manage-install to locally install various Go versions
/bin/bash: go1.23.2: command not found
make: go1.23.2 ready
make: Installing tools...
cd .ci/providerlint && go1.23.2 install .
/bin/bash: go1.23.2: command not found
make: *** [tools] Error 127

Tried various routes but the thing that fixed it for me was adding $HOME/go/bin to my PATH i.e. I checked the paths to my GOBIN lined up - I remember having done this previously but not on this machine.