Home

Published

- 1 min read

linux mint install terraform

img of linux mint install terraform

The solution for this is noted below

linux mint install terraform

Solution

   #1 if all good:
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

#2 if not!!!!
sudo apt update
sudo apt install wget curl unzip ## get some tools
## latest - you can use the wget
TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \"\,\v | awk '{$1=$1};1'`
wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip
## specific version
dpkg --print-architecture
# go to https://releases.hashicorp.com/terraform/ and
# get/download the desired package/bin
# (lets say: version 1.3.3 for linux with architecture amd64)

# with the bins downloaded, unzip and move it to bin folder
unzip terraform_1.3.3_linux_amd64.zip
sudo mv terraform /usr/local/bin/
# you should have the terraform available on you terminal/computer
terraform -version

Try other methods by searching on the site. That is if this doesn’t work