File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,20 @@ gvm是第三方开发的Go多版本管理工具,类似ruby里面的rvm工具
120
120
执行完上面的命令之后GOPATH、GOROOT等环境变量会自动设置好,这样就可以直接使用了。
121
121
122
122
### apt-get
123
- Ubuntu是目前使用最多的Linux桌面系统,使用` apt-get ` 命令来管理软件包,我们可以通过下面的命令来安装Go:
123
+ Ubuntu是目前使用最多的Linux桌面系统,使用` apt-get ` 命令来管理软件包,我们可以通过下面的命令来安装Go,为了以后方便,应该把 ` git ` ` mercurial ` 也安装上 :
124
124
125
+ sudo apt-get install python-software-properties
125
126
sudo add-apt-repository ppa:gophers/go
126
127
sudo apt-get update
127
- sudo apt-get install golang-stable
128
+ sudo apt-get install golang-stable git-core mercurial
128
129
129
130
### homebrew
130
- homebrew是Mac系统下面目前使用最多的管理软件的工具,目前已支持Go,可以通过命令直接安装Go:
131
+ homebrew是Mac系统下面目前使用最多的管理软件的工具,目前已支持Go,可以通过命令直接安装Go,为了以后方便,应该把 ` git ` ` mercurial ` 也安装上 :
131
132
133
+ brew update && brew upgrade
132
134
brew install go
135
+ brew install git
136
+ brew install mercurial
133
137
134
138
135
139
## links
Original file line number Diff line number Diff line change 9
9
``` sh
10
10
export GOPATH=/home/apple/mygo
11
11
```
12
+ 为了方便,应该把新建以上文件夹,并且把以上一行加入到 ` .bashrc ` 或者 ` .zshrc ` 或者自己的 ` sh ` 的配置文件中。
13
+
12
14
Windows 设置如下,新建一个环境变量名称叫做GOPATH:
13
15
``` sh
14
16
GOPATH=c:\m ygo
You can’t perform that action at this time.
0 commit comments