go语言环境
发布时间:2023-03-10 编辑:jiaochengji.com
教程集为您提供go语言环境等资源,欢迎您收藏本站,我们将为您提供最新的go语言环境资源
ChatGPT 账号代注册
价格49元一个,一次注册终身使用
另送科学上网教程,ChatGPT使用教程
联系方式:加微信搜 xingyi4200
价格49元一个,一次注册终身使用
另送科学上网教程,ChatGPT使用教程
联系方式:加微信搜 xingyi4200
操作系统:ubuntu 64bit
依次执行(这里是在/目录下执行的)
1、sudo apt-get install bison ed gawk gcc libc6-dev make
2、apt-get install python-setuptools python-dev build-essential
3、sudo easy_install mercurial
4、hg clone -r release https://go.googlecode.com/hg/ go
5、cd go/src
6、 ./all.bash
显示:
--- cd ../test
N known bugs; 0 unexpected bugs
---
Installed Go for linux/amd64 in /home/you/go.
Installed commands in /home/you/go/bin.
*** You need to add /home/you/go/bin to your $PATH. ***
The compiler is 6g.
这表示安装完毕,但还需要把一些东西加入到PATH中去
安装完成后把一下的环境变量复制到~/bashrc文件中
export GOROOT=/go
export GOARCH=amd64
export GOOS=linux
export GOBIN=/go/bin
PATH=${PATH}:/go/bin
这样直接在终端上输入6g则会显示以下提示:
gc: usage: 6g [flags] file.go...
flags:
-I DIR search for packages in DIR
-d print declarations
-e no limit on number of errors printed
-f print stack frame structure
-h panic on an error
-o file specify output file
-S print the assembly language
-V print the compiler version
-u disable package unsafe
-w print the parse tree after typing
-x print lex tokens
这表示已安装成功
到此这篇关于“go语言环境”的文章就介绍到这了,更多文章或继续浏览下面的相关文章,希望大家以后多多支持JQ教程网!
依次执行(这里是在/目录下执行的)
1、sudo apt-get install bison ed gawk gcc libc6-dev make
2、apt-get install python-setuptools python-dev build-essential
3、sudo easy_install mercurial
4、hg clone -r release https://go.googlecode.com/hg/ go
5、cd go/src
6、 ./all.bash
显示:
--- cd ../test
N known bugs; 0 unexpected bugs
---
Installed Go for linux/amd64 in /home/you/go.
Installed commands in /home/you/go/bin.
*** You need to add /home/you/go/bin to your $PATH. ***
The compiler is 6g.
这表示安装完毕,但还需要把一些东西加入到PATH中去
安装完成后把一下的环境变量复制到~/bashrc文件中
export GOROOT=/go
export GOARCH=amd64
export GOOS=linux
export GOBIN=/go/bin
PATH=${PATH}:/go/bin
这样直接在终端上输入6g则会显示以下提示:
gc: usage: 6g [flags] file.go...
flags:
-I DIR search for packages in DIR
-d print declarations
-e no limit on number of errors printed
-f print stack frame structure
-h panic on an error
-o file specify output file
-S print the assembly language
-V print the compiler version
-u disable package unsafe
-w print the parse tree after typing
-x print lex tokens
这表示已安装成功
有疑问加站长微信联系(非本文作者)

您可能感兴趣的文章:
go 语言环境搭建
初识GO语言以及GO语言安装及环境搭建
想系统学习GO语言(Golang
go run main.go 参数_Go语言入门:Hello world
Go语言环境安装
go语言环境安装配置
Go编程基础—windows下Go语言开发环境搭建
1.2Go语言开发环境搭建
从零开始学习GO语言-搭建Go语言开发环境-快速开发入门第一个小程序
查看go 安装了哪些包_go语言基础入门(一)
上一篇:golang日期字符串与时间戳转换
下一篇:Mac电脑安装及终端命令使用mysql
[关闭]