如何在 Windows 10 linux 子系统上卸载 terraform 并安装更新版本的 terraform? [英] How to uninstall terraform and install newer version of terraform on windows 10 linux subsystem?
问题描述
我想在 windows 10 linux 子系统上安装更新版本的 terrafrom 0.12.24.我是使用这个界面的新手,我不知道该怎么做
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
我使用这些命令在 Windows 10 linux 子系统上安装了 terraform
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.
无法加载根配置模块:解析 terraform/local/terraform.tf 时出错:在 119:12:未知令牌:119:12 IDENT 文件
Failed to load root config module: Error parsing terraform/local/terraform.tf: At 119:12: Unknown token: 119:12 IDENT file
为了解决这个问题,我计划从 0.12.24 升级到更新版本的 terra.有人可以为我提供卸载和安装新版本 terraform 的命令吗,谢谢.
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.
推荐答案
这里应该安装0.12.24版本
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) wget 提供的链接是所需软件包的可下载链接.wget 帮助下载它.我把这里的版本改成了你需要的版本.
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) 解压
3) 移至/usr/local/bin 文件夹.
3) moved to /usr/local/bin folder.
4) 删除 zip,因为我们已经将内容复制到 bin 文件夹
4) Removing the zip as we have already copied the contents to bin folder
这篇关于如何在 Windows 10 linux 子系统上卸载 terraform 并安装更新版本的 terraform?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!