Merge commit '3de731cbe227515fed753242b692a09582524784' into ja
This commit is contained in:
@@ -120,16 +120,20 @@ gvm是第三方开发的Go多版本管理工具,类似ruby里面的rvm工具
|
||||
执行完上面的命令之后GOPATH、GOROOT等环境变量会自动设置好,这样就可以直接使用了。
|
||||
|
||||
### apt-get
|
||||
Ubuntu是目前使用最多的Linux桌面系统,使用`apt-get`命令来管理软件包,我们可以通过下面的命令来安装Go:
|
||||
Ubuntu是目前使用最多的Linux桌面系统,使用`apt-get`命令来管理软件包,我们可以通过下面的命令来安装Go,为了以后方便,应该把 `git` `mercurial` 也安装上:
|
||||
|
||||
sudo apt-get install python-software-properties
|
||||
sudo add-apt-repository ppa:gophers/go
|
||||
sudo apt-get update
|
||||
sudo apt-get install golang-stable
|
||||
sudo apt-get install golang-stable git-core mercurial
|
||||
|
||||
### homebrew
|
||||
homebrew是Mac系统下面目前使用最多的管理软件的工具,目前已支持Go,可以通过命令直接安装Go:
|
||||
homebrew是Mac系统下面目前使用最多的管理软件的工具,目前已支持Go,可以通过命令直接安装Go,为了以后方便,应该把 `git` `mercurial` 也安装上:
|
||||
|
||||
brew update && brew upgrade
|
||||
brew install go
|
||||
brew install git
|
||||
brew install mercurial
|
||||
|
||||
|
||||
## links
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
```sh
|
||||
export GOPATH=/home/apple/mygo
|
||||
```
|
||||
为了方便,应该把新建以上文件夹,并且把以上一行加入到 `.bashrc` 或者 `.zshrc` 或者自己的 `sh` 的配置文件中。
|
||||
|
||||
Windows 设置如下,新建一个环境变量名称叫做GOPATH:
|
||||
```sh
|
||||
GOPATH=c:\mygo
|
||||
|
||||
Reference in New Issue
Block a user