做网页大概需要多少钱,网站优化知识资讯,网站降权恢复,poedit2 汉化wordpress背景 无论你是哪个编程语言的开发者#xff0c;例如 Java、Go 等#xff0c;通常在本地开发过程中#xff0c;你经常需要安装相应的 SDK。由于各种原因#xff0c;往往需要在不同的项目中来回切换多个版本的 SDK。
安装步骤
1.安装homebrew
/bin/bash -c $(curl -… 背景 无论你是哪个编程语言的开发者例如 Java、Go 等通常在本地开发过程中你经常需要安装相应的 SDK。由于各种原因往往需要在不同的项目中来回切换多个版本的 SDK。
安装步骤
1.安装homebrew
/bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
详细步骤参考macos系统安装homebrew包管理工具_mac os 管理工具-CSDN博客
2.安装Wget
brew install wget
3.安装多版本管理工具
1安装前清空手动安装的GOROOT、GOBIN等环境变量
# 注释掉goroot、gobin等环境变量
sudo vi ~/.bash_profile
source ~/.bash_profile
2一键安装g工具
# 建议安装前清空GOROOT、GOBIN等环境变量
$ curl -sSL https://raw.githubusercontent.com/voidint/g/master/install.sh | bash
$ echo unalias g ~/.bashrc # 可选。若其他程序如git使用了g作为别名。
$ source $HOME/.g/env
3列出可用的 Go 版本
g ls-remote
4安装特定版本的 Go
g install 1.21.5
5切换到特定版本的 Go
g use 1.21.5
6查看go版本
go version
4.g工具使用教程
参考https://github.com/voidint/g/blob/master/README_CN.md
结束