我有1.7版的golang,想要通过命令提示符将golang更新到1.8。卸载并重新安装是一种选择,但是我能否在Windows 8.1上使用命令来更新它?
我有1.7版的golang,想要通过命令提示符将golang更新到1.8。卸载并重新安装是一种选择,但是我能否在Windows 8.1上使用命令来更新它?
使用Chocolatey软件包管理器也可以更新Go。请在管理员权限的命令行中运行以最小化安装问题的风险。
安装命令:
choco install golang -y
使用以下方式进行更新:
choco upgrade golang -y
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.5
gvm list
https://dl.google.com/go/go<version>.windows-amd64.msi
。
你可以使用类似于Wget for Windows或者Powershell功能的工具进行下载:
Invoke-WebRequest -OutFile go1.13.4.windows-amd64.msi https://dl.google.com/go/go1.13.4.windows-amd64.msi
然后你就可以在安静模式下使用MSI:
msiexec.exe /package go1.13.4.windows-amd64.msi /quiet
refreshenv
)。golang的升级成功。软件安装为'msi',安装位置可能是默认值。”git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh