Golang 安装笔记
Table of Contents
1 Windows 上从二进制压缩包安装
下载并解压压缩包,假设路径为 d:\DevTools\go1.18.1.windows-amd64\。
打开 控制面板 -> 系统和安全 -> 系统 -> 高级系统设置 -> 高级 -> 环境变量:
- 添加系统变量
GOROOT
值为d:\DevTools\go1.18.1.windows-amd64\
- 把
%GOROOT%/bin
路径添加到Path
变量值中
如果需要一个全局的 GOPATH
的话:
- 添加系统变量
GOPATH
值为d:\DevTools\go-packages
- 把
%GOPATH%/bin
路径添加到Path
变量值中