Below error is generated when installing terraform from official documentation.
sudo yum-config-manager — add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
adding repo from: https://rpm.releases.hashicorp.com//hashicorp.repo
grabbing file https://rpm.releases.hashicorp.com//hashicorp.repo to /etc/yum.repos.d/hashicorp.repo
Could not fetch/save url https://rpm.releases.hashicorp.com//hashicorp.repo to file /etc/yum.repos.d/hashicorp.repo: [Errno 14] HTTPS Error 404 — Not Found
Error is generated because of the value of the release variable in the URL is null.
echo $release
Set the release value as “RHEL” for RedHat and Centos and “AMAZONLINUX” for Amazon Linux AMI
Execute below to find if the value is set.
[root@sirjoon ~]# echo $release
RHEL
- Now run the command and the repo will be configured.
[root@sirjoon ~]# yum-config-manager — add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
Updating Subscription Management repositories.
Adding repo from: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
This should be fixed in official documentation.