编译go1.7beta2

来源:互联网 发布:与sqlserver建立连接 编辑:程序博客网 时间:2024/04/30 04:17

   今天有碰到个"local error: no renegotiation"问题,就去尝试编译了下Go1.7beta2

记录下:
  1. 安装 go1.4


 [root@ip-172-31-16-112 src]# export GOROOT=/root/go1.4
[root@ip-172-31-16-112 src]# export PATH=$PATH:$GOROOT/bin
[root@ip-172-31-16-112 src]# ./make.bash
##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /root/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.




root@ip-172-31-16-112 src]# export GOROOT=/opt/go14/go
[root@ip-172-31-16-112 src]# export PATH=$PATH:$GOROOT/bin
[root@ip-172-31-16-112 src]# GOROOT_BOOTSTRAP=$GOROOT ./all.bash
##### Building Go bootstrap tool.
cmd/dist


go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT










 2. 安装信赖包
 yum install gcc glibc-devel




 [root@ip-172-31-16-112 src]# ./make.bash
##### Building Go bootstrap tool.
cmd/dist


go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT




vi $GOROOT/VERSION






[root@ip-172-31-16-112 go-go1.7beta2]# cat VERSION
go1.7beta2




[root@ip-172-31-16-112 src]# ./make.bash
##### Building Go bootstrap tool.
cmd/dist


##### Building Go toolchain using /root/go1.4.
errors
math
container/heap


......
---
Installed Go for linux/amd64 in /opt/go172/go-go1.7beta2
Installed commands in /opt/go172/go-go1.7beta2/bin






[root@ip-172-31-16-112 bin]# ./go version
go version go1.7beta2 linux/amd64




参考: https://golang.org/doc/install/source
       https://github.com/golang/go/wiki/InstallFromSource

0 0