Ubuntu 14.04LTS 默认安装的golang版本为go1.2.1
sudo apt-get install golang go version # 输出结果 go version go1.2.1 linux/amd64
从golang的官网下载最新版本:
tar -zxvf go1.4.2.linux-amd64.tar.gz -C /usr/local export GOROOT=/usr/local/go export GOPATH=$HOME/go export PATH=$PATH:/usr/local/go/bin:/$HOME/go/bin
gvm
一个Go Lang的版本管理器
sudo apt-get install curl git mercurial make binutils bison gcc build-essential curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer
version - print the gvm version number get - gets the latest code (for debugging) use - select a go version to use diff - view changes to Go root implode - completely remove gvm install - install go versions uninstall - uninstall go versions cross - install go cross compilers linkthis - link this directory into GOPATH list - list installed go versions listall - list available versions alias - manage go version aliases pkgset - manage go packages sets pkgenv - edit the environment for a package set
Add Comment