ubuntu安装go
2014-01-24 11:47
435 查看
1,源码编译
apt-get update;
apt-get install -y gcc libc6-dev;
apt-get install -y mercurial;
apt-get install -y git;
hg clone -u release https://code.google.com/p/go;
cd go/src && ./all.bash;
2,apt-get 安装
I found a repo that has the latest versions: https://launchpad.net/~duh/+archive/golang/+packages.
So basically do:
To confirm:
which outputs in my case (Ubuntu precise)
From there just export the settings you're gonna need to bash_rc or equivalent:
apt-get update;
apt-get install -y gcc libc6-dev;
apt-get install -y mercurial;
apt-get install -y git;
hg clone -u release https://code.google.com/p/go;
cd go/src && ./all.bash;
2,apt-get 安装
I found a repo that has the latest versions: https://launchpad.net/~duh/+archive/golang/+packages.
So basically do:
sudo apt-get install python-software-properties # 12.04 sudo add-apt-repository ppa:duh/golang sudo apt-get update sudo apt-get install golang
To confirm:
go version
which outputs in my case (Ubuntu precise)
go version go1.1.1 linux/amd64
From there just export the settings you're gonna need to bash_rc or equivalent:
export GOROOT=/usr/lib/go export GOBIN=/usr/bin/go
相关文章推荐
- Ubuntu go语言环境
- ubuntu 安装 gccgo 并编译go
- Golang 单例模式 singleton pattern
- google IP地址大全
- Directshow 如何在视频中插入水印Logo图片
- Pass Google Fast - 100x The Traffic!
- golang文件服务器
- NSClassFromString,NSSelectorFromString,isKingOfClass
- Django 中随机获取指定数量数据
- Go语言闭包的小例子
- Go语言int类型绑定方法
- Go语言的优点
- Go语言模拟实现接口
- Go语言版冒泡排序
- [转] Go windows环境搭建
- Go语言并发例子
- CEF中文教程(google chrome浏览器控件) -- CEF简介
- EasyGoing(出行无忧)
- bae3.0第二步 添加一个空的django项目
- 谷歌眼镜开发Mirror API之Go语言开发