go1.4 bootstrap 源码安装新版go

akez · · 657 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

1.下载go1.4-bootstrap
wget https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz
tar -zxvf go1.4-bootstrap-20171003.tar.gz
2.配置GOROOT_BOOTSTRAP
vim /etc/profile.d/go1.4-bootstrap.sh

export GOROOT_BOOTSTRAP=/usr/local/src/go1.4-bootstrap
export CGO_ENABLED=0

source /etc/profile
3.安装go1.4-bootstrap
cd go1.4-bootstrap/src
./make.bash
4.源码安装go
wget https://golang.google.cn/dl/go1.16.2.src.tar.gz
tar -zxvf go1.16.2.src.tar.gz
cd go/src
./all.bash
5. 配置环境变量
vim /etc/profile.d/go.sh

export $GOROOT=/usr/local/soft/go
export $GOPATH=/workspace/go
export PATH=$PATH:$GOROOT/bin
export GOPROXY=https://goproxy.cn,direct

有疑问加站长微信联系(非本文作者)

本文来自:Segmentfault

感谢作者:akez

查看原文:go1.4 bootstrap 源码安装新版go

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

657 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传