18 M2芯片Mac下golang的安装及配置

一、golang的安装

在终端输入

brew install [email protected]

牢记你的golang安装路径

我的是/opt/homebrew/Cellar/[email protected]/1.16.15

我还安装过第二个版本/opt/homebrew/Cellar/[email protected]/1.17.13

二、golang的环境配置

vim  ~/.zshrc

追加上红圈中的内容

三、验证

输入go version进行验证

出现下图所示结果则表示配置成功

猜你喜欢

转载自blog.csdn.net/weixin_68930048/article/details/128668241