armhf debian 安装go1.8.5

1

“`
root@bananapi ~/download # ls
go1.8.5.linux-armv6l.tar.gz
root@bananapi ~/download # go env
GOARCH=”arm”
GOBIN=””
GOCHAR=”5”
GOEXE=””
GOHOSTARCH=”arm”
GOHOSTOS=”linux”
GOOS=”linux”
GOPATH=””
GORACE=””
GOROOT=”/usr/lib/go”
GOTOOLDIR=”/usr/lib/go/pkg/tool/linux_arm”
CC=”gcc”
GOGCCFLAGS=”-fPIC -marm -pthread -fmessage-length=0”
CXX=”g++”
CGO_ENABLED=”1”
root@bananapi ~/download # apt-get remove golang
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
golang-doc golang-go golang-go-linux-arm
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
golang
0 upgraded, 0 newly installed, 1 to remove and 80 not upgraded.
After this operation, 91.1 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 23604 files and directories currently installed.)
Removing golang (2:1.3.3-1) …
apt-get remove golang 4.21s user 0.87s system 45% cpu 11.212 total

“`l

2 下载go1.8.5


wget https://storage.googleapis.com/golang/go1.8.5.linux-armv6l.tar.gz 

root@bananapi ~/download # ls  
go1.8.5.linux-armv6l.tar.gz
root@bananapi ~/download # 

3 删除掉原有的go1.2 1.3,新建立一个脚本设置go环境

在/usr/local/bin/下面建立mgo

#!/bin/sh
#SET ENV FOR GO1.8.5 IN /USR/LOCAL
export GOROOT=/usr/local/go1.8.5
export GOPATH=/root/Project/gowork
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

go version 
echo $GOROOT
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

等风来不如迎风去

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值