linux-golang编译器安装与配置

栏目: 服务器 · 编程工具 · 发布时间: 5年前

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 

====================== 

参考 


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

XML Hacks

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》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具