当前位置:网站首页>02.Go语言开发环境配置
02.Go语言开发环境配置
2022-07-06 01:30:00 【[email protected]】
目录
1. Go 安装
1.1 Linux平台安装Go
1.1.1 使用 Linux,可以用如下方式快速安装。
$ wget https://golang.google.cn/dl/go1.18.3.linux-amd64.tar.gz
$ tar -xzvf go1.18.3.linux-amd64.tar.gz
$ mv go /usr/local/#####################################################
1.1.2 设置环境变量
# 安装目录
export GOROOT=/usr/local/go
# 代码目录
export GOPATH=~/code export
PATH=$PATH:$GOPATH:$GOROOT/bin1.1.3 检查是否安装成功
输入 go version 查看go的版本号
如果出现go的版本号,则说明go安装成功
[[email protected] lianxi]# go version
go version go1.18.3 linux/amd64
[[email protected] lianxi]#
#####################################################
1.2 windows安装go
1.2.1 下载
下载路径:https://golang.google.cn/dl/go1.18.3.windows-amd64.msi
下载完成后直接安装 .msi文件就行

#####################################################
1.2.2 将安装路径添加到环境变量
示例:我将go安装在了 : E:\go
进入环境变量的配置

用户变量和环境变量都可以,(反正是自己用的机器)
新建GOROOT变量,变量值为go安装路径

新建GOPATH变量,这个变量用来存放go代码的目录的路径(go_code是自己新建的)

然后在系统变量的path变量里面添加这两条

#####################################################
1.2.3 检查go在windows是否安装成功
能成功显示版本号即安装成功

版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_48391148/article/details/125571213
边栏推荐
- 现货白银的一般操作方法
- 电气数据|IEEE118(含风能太阳能)
- 【网络攻防实训习题】
- Electrical data | IEEE118 (including wind and solar energy)
- Recommended areas - ways to explore users' future interests
- Redis-列表
- Basic process and testing idea of interface automation
- Idea sets the default line break for global newly created files
- Cadre du Paddle: aperçu du paddlelnp [bibliothèque de développement pour le traitement du langage naturel des rames volantes]
- 【详细】快速实现对象映射的几种方式
猜你喜欢

基于DVWA的文件上传漏洞测试

Recommended areas - ways to explore users' future interests

ThreeDPoseTracker项目解析

You are using pip version 21.1.1; however, version 22.0.3 is available. You should consider upgradin

Electrical data | IEEE118 (including wind and solar energy)

A Cooperative Approach to Particle Swarm Optimization

一图看懂!为什么学校教了你Coding但还是不会的原因...

Idea sets the default line break for global newly created files
![[机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。](/img/3c/ec97abfabecb3f0c821beb6cfe2983.jpg)
[机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。

现货白银的一般操作方法
随机推荐
电气数据|IEEE118(含风能太阳能)
基於DVWA的文件上傳漏洞測試
Ordinary people end up in Global trade, and a new round of structural opportunities emerge
VMware Tools installation error: unable to automatically install vsock driver
Cadre du Paddle: aperçu du paddlelnp [bibliothèque de développement pour le traitement du langage naturel des rames volantes]
Leetcode daily question solution: 1189 Maximum number of "balloons"
[understanding of opportunity-39]: Guiguzi - Chapter 5 flying clamp - warning 2: there are six types of praise. Be careful to enjoy praise as fish enjoy bait.
Loop structure of program (for loop)
3D model format summary
MySQL learning notes 2
A picture to understand! Why did the school teach you coding but still not
Maya hollowed out modeling
You are using pip version 21.1.1; however, version 22.0.3 is available. You should consider upgradin
About error 2003 (HY000): can't connect to MySQL server on 'localhost' (10061)
Cookie concept, basic use, principle, details and Chinese transmission
【Flask】获取请求信息、重定向、错误处理
SPIR-V初窺
Format code_ What does formatting code mean
Force buckle 1020 Number of enclaves
C web page open WinForm exe