tfenv icon indicating copy to clipboard operation
tfenv copied to clipboard

404 during specified package install

Open crosbygw opened this issue 3 years ago • 5 comments

Installing Terraform v0.12.31 Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_arm64.zip curl: (22) The requested URL returned error: 404

crosbygw avatar Dec 21 '22 21:12 crosbygw

I hit this problem too.

When I navigate to https://releases.hashicorp.com/terraform/ it looks like the issue is with the path - the directories are all terraform_X.X.X, rather than just the version. Eg. the binary I need is at https://releases.hashicorp.com/terraform/0.13.5/terraform_0.13.5_darwin_amd64.zip .

Seems like it might be an easy fix?

colmsnowplow avatar Feb 02 '23 14:02 colmsnowplow

@crosbygw I notice you're also on arm - I resolved by setting export TFENV_ARCH=amd64. Works as expected for me once that's set!

colmsnowplow avatar Feb 02 '23 15:02 colmsnowplow

Thank you @colmsnowplow for pointing out. I cam across the same issue and double checked link. Setting TFENV_ARCH as you suggested works like charm 🙌

norchen avatar Feb 08 '23 14:02 norchen

@Zordrak @OJFord This was fixed by https://github.com/tfutils/tfenv/commit/c30dae23c8fc70cc0022dc9c34a95da646dc8249

~
➜ tfenv --version
tfenv 3.0.0

~
➜ tfenv install 0.12.31
Installing Terraform v0.12.31
Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_darwin_amd64.zip
################################################################################################################################################# 100.0%
Downloading SHA hash file from https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_SHA256SUMS
Not instructed to use Local PGP (/opt/homebrew/Cellar/tfenv/3.0.0/use-{gpgv,gnupg}) & No keybase install found, skipping OpenPGP signature verification
Archive:  /var/folders/md/4w4vvwp17416xtmcnpv2d_n80000gq/T/tfenv_download.90yksz/terraform_0.12.31_darwin_amd64.zip
  inflating: /opt/homebrew/Cellar/tfenv/3.0.0/versions/0.12.31/terraform
Installation of terraform v0.12.31 successful. To make this your default version, run 'tfenv use 0.12.31'

~ took 5s
➜

n3ph avatar Apr 06 '23 00:04 n3ph

I faced the same problem today again. And after defining TFENV_ARCH, it got resolved.

ankajain avatar Apr 30 '24 10:04 ankajain