当前位置:网站首页>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/bin
1.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
边栏推荐
- Yii console method call, Yii console scheduled task
- Code review concerns
- Leetcode 208. Implement trie (prefix tree)
- How to get all sequences in Oracle database- How can I get all sequences in an Oracle database?
- Basic process and testing idea of interface automation
- 关于softmax函数的见解
- 【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
- Electrical data | IEEE118 (including wind and solar energy)
- [flask] static file and template rendering
- [the most complete in the whole network] |mysql explain full interpretation
猜你喜欢
【详细】快速实现对象映射的几种方式
A Cooperative Approach to Particle Swarm Optimization
Some features of ECMAScript
【SSRF-01】服务器端请求伪造漏洞原理及利用实例
Alibaba-Canal使用详解(排坑版)_MySQL与ES数据同步
3D vision - 4 Getting started with gesture recognition - using mediapipe includes single frame and real time video
Basic operations of databases and tables ----- primary key constraints
How to see the K-line chart of gold price trend?
VMware Tools installation error: unable to automatically install vsock driver
Mongodb problem set
随机推荐
A Cooperative Approach to Particle Swarm Optimization
一圖看懂!為什麼學校教了你Coding但還是不會的原因...
[flask] static file and template rendering
MATLB | real time opportunity constrained decision making and its application in power system
ClickOnce 不支持请求执行级别“requireAdministrator”
Paddle框架:PaddleNLP概述【飛槳自然語言處理開發庫】
Use of crawler manual 02 requests
Basic operations of database and table ----- set the fields of the table to be automatically added
False breakthroughs in the trend of London Silver
ClickOnce does not support request execution level 'requireAdministrator'
VMware Tools安装报错:无法自动安装VSock驱动程序
Some features of ECMAScript
[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.
leetcode刷题_反转字符串中的元音字母
晶振是如何起振的?
leetcode刷题_验证回文字符串 Ⅱ
Leetcode1961. 检查字符串是否为数组前缀
Leetcode daily question solution: 1189 Maximum number of "balloons"
MySQL learning notes 2
Alibaba-Canal使用详解(排坑版)_MySQL与ES数据同步