树莓派安装go

栏目: 软件资讯 · 发布时间: 7年前

内容简介:大学的时候在使用openfalcon的时候讲过这个东西,但是那时候是介绍open-falcon的,所以感觉不是很具体,所以今天在安装frp的时候也碰到了这个问题,我就具体的说下编译最新版本的go的时候一定要先编译安装go1.4,因为那个版本之前的go都是使用gcc编译的,之后的go都是使用go编译的,所以在安装最新的go之前要编译1.4的go

树莓派安装go

大学的时候在使用openfalcon的时候讲过这个东西,但是那时候是介绍open-falcon的,所以感觉不是很具体,所以今天在安装frp的时候也碰到了这个问题,我就具体的说下

安装 go 1.4

编译最新版本的go的时候一定要先编译安装go1.4,因为那个版本之前的go都是使用gcc编译的,之后的go都是使用go编译的,所以在安装最新的go之前要编译1.4的go

首先下载

wget https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz

解压编译安装

tar -zxvf go1.4-bootstrap-20171003.tar.gz

cd go/src/

./make.bash

cd ../../

mv go /usr/local/

export PATH=$PATH:/usr/local/go/bin

安装最新版本的go

首先下载最新版本的go

wget https://dl.google.com/go/go1.12.4.src.tar.gz

解压编译安装

tar -zxvf go1.12.4.src.tar.gz

cd go/src

export GOROOT_BOOTSTRAP=/usr/local/go/

./make.bash

查看下现在的go版本

go version

之后删除1.4版本的go

rm -rf /usr/local/go/

把新版本的go移动到这个路径

cd .. && mv go /usr/local/

最后添加环境变量

vim /etc/profile

加入

export PATH=$PATH:/usr/local/go/bin

source /etc/profile

最后验证一下go的版本

go version

欢迎关注Bboysoul的博客www.bboysoul.com

Have Fun


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

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

Distributed Algorithms

Distributed Algorithms

Wan Fokkink / The MIT Press / 2013-12-6 / USD 40.00

This book offers students and researchers a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. It avoids mathematical argumentat......一起来看看 《Distributed Algorithms》 这本书的介绍吧!

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

在线图片转Base64编码工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换