golang编译器安装与配置
golang目前有两种编译,一个是golang官方提供的,另一个是gnu提供的gccgo;
golang官方编译器安装与配置
安装gcc工具,因为golang有些功能是使用c写的,所以构建golang的编译是必须的
$ sudo apt-get install bison gawk gcc libc6-dev make
安装mercurial工具,目的使用hg命令来提取golang的源代码
$ sudo apt-get install mercurial
代取提取,如果您的网速比较慢的话,此步要多花点时间
$ hg clone -u release https://go.googlecode.com/hg/ go
编译golang
$ cd go/src
$ ./all.bash
设置$PATH
$ cd /etc/profile.d/
$ vi go.sh
export GOROOT=/home/go
export GOPATH=/home/website
export GOBIN=$GOROOT/bin
export GOARCH=amd64
export GOOS=linux
export PATH=.:$PATH:$GOBIN
$ . ./go.sh
======================
参考
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- LLVM接受NVIDIA的“f18” Fortran编译器作为官方Fortran编译器
- 编译原理实战入门:用 JavaScript 写一个简单的四则运算编译器(四)结语
- Scala.js 0.6.29 发布,将 Scala 编译成 js 的编译器
- Go 编译器介绍
- Go 编译器介绍
- C++编译器优化
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
XML Hacks
Michael Fitzgerald / O'Reilly Media, Inc. / 2004-07-27 / USD 24.95
Developers and system administrators alike are uncovering the true power of XML, the Extensible Markup Language that enables data to be sent over the Internet from one computer platform to another or ......一起来看看 《XML Hacks》 这本书的介绍吧!