Please tell how to install Terraform on this CentOS or how to install previous version? Thanks in advance!
Meanwhile I’ll try to install a Linux binary file…
I’m not personally familiar enough with Yum to give instructions on how to force it to use a different version, but I do know that the .rpm files in these repositories are all just wrappers around the same Linux executable available on releases.hashicorp.com, and so a hypothetical package built for RHEL 9 would contain exactly the same executable as the one for RHEL 8, and so it should work to install the RHEL 8 package on CentOS 9.
When I retrieve the documented installation URL https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo I see the following content, at the time of writing:
Perhaps it work to retrieve this metadata file, replace the $releasever placeholder with a hard-coded 8 to force using the older version, and then add the result to Yum. However, I cannot promise that will work, since I am not familiar with Yum and have not tested it.
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Adding repo from: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum install terraform -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Hashicorp Stable - x86_64 1.1 kB/s | 313 B 00:00
Errors during downloading metadata for repository 'hashicorp':
- Status code: 404 for https://rpm.releases.hashicorp.com/RHEL/8.6/x86_64/stable/repodata/repomd.xml (IP: 13.224.132.102)
Error: Failed to download metadata for repo 'hashicorp': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried