User-Profile-Image
hankin
  • 5
  • 首页
  • 分类
    • Windows
    • Web
    • VoIP
    • Virtualization
    • Trading
    • Smart Home
    • SEO
    • Security
    • Python
    • Program
    • PHP
    • OSX
    • OS
    • OpenSource
    • Nginx
    • MySQL
    • Mood
    • Linux
    • Life
    • Injection
    • Hosting
    • Finance
    • Exploits
    • CDN
  • 页面
    • About
  • 友链
    • 维酷科技
Help?

Please contact us on our email for need any support

Support
  • 首页
    首页   ›   Program   ›   正文
Program

编译安装go语言运行环境

2020-12-27 23:55:23
2923  0 0

1、下载安装包

官网地址:https://golang.org/dl/

如果无法访问备用地址:https://golang.google.cn/dl/

根据自己的操作系统选择对应的版本

我这里以树莓派为例选择arm6版本下载

wget -c https://golang.google.cn/dl/go1.15.6.linux-armv6l.tar.gz

2、解压到指定位置

tar zxvf go1.15.6.linux-armv6l.tar.gz -C /usr/local/

3、配置环境变量

创建go的工作空间

mkdir /home/goProject

编辑profile文件

vim /etc/profile
export GOROOT=/usr/local/go
export GOPATH=/home/goProject 
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin

更新profile文件

source /etc/profile

查看当前go版本以检测是否成功配置go环境

go version
评论 (0)

Click here to cancel reply.

欢迎您 游客  

    ProdigYu
    181文章 25评论 5点赞 653359浏览
    随机文章
    浏览器console控制台自动刷新js代码
    5年前
    kangle清除缓存接口
    6年前
    2024美股假期
    2年前
    详解CentOS下安装Glances
    12年前
    11月的百度SEO心得
    13年前
    Tags
    Apache CentOS CMD DDOS Debian DNS Docker FastCGI Google IIS IP iptables Linux Mac MySQL Nginx Opensource PHP Python Skill SSH Ubuntu Vim VMware VPN web.py Windows 删除 命令 命令提示符 安装 开源 技巧 插件 漏洞 百度 系统 组件 终端 缓存 网络电话 脚本 自建 详解 错误
    Meta
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Copyright © 2025
    主页
    页面
    • About
    博主
    ProdigYu 管理员
    Something about myself
    181 文章 25 评论 653359 浏览
    测试
    测试