0
votes

i want to install a newer version of terrafrom 0.12.24 on windows 10 linux subsystem. i am new to using this interface and i am not sure how to do it

i installed terraform on Windows 10 linux subsystem using these commands

wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip -O 
terraform.zip; 
unzip terraform.zip; 
sudo mv terraform /usr/local/bin; 
rm terraform.zip;

however this installed older version.. and when i ran some script it gave me this error.

Failed to load root config module: Error parsing terraform/local/terraform.tf: At 119:12: Unknown token: 119:12 IDENT file

To fix this i am planning to upgrade to newer version of terrafrom 0.12.24. could someone provide me with commands to uninstall and install newer version of terraform thanks.

2
Your question and error message has no correlation. You have an issue with Terraform configuration, not with terraform installation.learner

2 Answers

6
votes

This should install 0.12.24 version

wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
unzip terraform_0.12.24_linux_amd64.zip
sudo mv terraform_0.12.24_linux_amd64 /usr/local/bin
rm terraform_0.12.24_linux_amd64.zip

Let me explain what these steps are:

1) The link given along with wget is the downloadable link for the required package. wget helps in downloading it. I changed the version here as your required version.

2) unzip it

3) moved to /usr/local/bin folder.

4) Removing the zip as we have already copied the contents to bin folder

3
votes

This is probably more appropriate as a comment but I do not yet have the reputation to do that. As of version 0.15.1, it unzipped only as "terraform", so line 3 in the above answer could just be:

sudo mv terraform /usr/local/bin

And this worked for me.