How to Fix Missing Terraform Darwin ARM64 Binary Issues
Sometimes you need to work with an older version of Terraform but there is no existing Darwin ARM64 binary for the version you need. Even if you’re using version managers like tfenv or asdf, you might find that the correct binary architecture is missing for the version you’re looking for. This is common for versions created before Mac processor architecture was released.
Here a quick workaround solution to fix this situation :
- Install go :
brew install go
- Clone the Terraform repository :
git clone https://github.com/hashicorp/terraform
- Checkout the required version of Terraform :
cd terraform
git checkout tags/v0.12.13
- Build an executable file :
go install .
- The previous
go
command build a binary in yourGOBIN
by default. Ensure it is present in yourPATH
:
export PATH="$PATH:$(go env GOBIN)"