英文:
How to install specific version of Go in Ubuntu using snap
问题
尝试使用Snap安装Go版本1.16,但无法成功。有人可以帮忙吗?
英文:
Trying to install go version 1.16 using snap but not able to. can someone help.
答案1
得分: 7
你可以运行snap info go
命令,它会给你一个go版本的列表。
sudo snap info go
然后你可以使用--channel
参数安装你喜欢的版本,像这样:
sudo snap install go --channel=1.6/stable --classic
这也适用于安装后的升级/降级到特定版本。例如,你想从1.17版本降级到1.16版本:
sudo snap refresh go --channel=1.6/stable --classic
英文:
-
you can run snap info go, which gives you a list of go versions.
`sudo snap info go`
-
Then you can install your preferred version with --channel like this.
sudo snap install go --channel=1.6/stable --classic
This will also work for upgrade / downgrade to specific version after installation. For example you want to downgrade from 1.17 go version to 1.16
`sudo snap refresh go --channel=1.6/stable --classic`
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论