当前位置:网站首页>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
边栏推荐
- [technology development -28]: overview of information and communication network, new technology forms, high-quality development of information and communication industry
- SPIR-V初窺
- File upload vulnerability test based on DVWA
- dried food! Accelerating sparse neural network through hardware and software co design
- 2022年广西自治区中职组“网络空间安全”赛题及赛题解析(超详细)
- Condition and AQS principle
- ClickOnce 不支持请求执行级别“requireAdministrator”
- [机缘参悟-39]:鬼谷子-第五飞箝篇 - 警示之二:赞美的六种类型,谨防享受赞美快感如同鱼儿享受诱饵。
- Modify the ssh server access port number
- ORA-00030
猜你喜欢
Threedposetracker project resolution
leetcode刷题_验证回文字符串 Ⅱ
VMware Tools installation error: unable to automatically install vsock driver
3D视觉——4.手势识别(Gesture Recognition)入门——使用MediaPipe含单帧(Singel Frame)和实时视频(Real-Time Video)
Unity | 实现面部驱动的两种方式
晶振是如何起振的?
[solved] how to generate a beautiful static document description page
3D vision - 4 Getting started with gesture recognition - using mediapipe includes single frame and real time video
Leetcode study - day 35
【已解决】如何生成漂亮的静态文档说明页
随机推荐
Poj2315 football games
Internship: unfamiliar annotations involved in the project code and their functions
Paddle框架:PaddleNLP概述【飛槳自然語言處理開發庫】
网易智企逆势进场,游戏工业化有了新可能
【Flask】获取请求信息、重定向、错误处理
[flask] official tutorial -part1: project layout, application settings, definition and database access
Crawler request module
Redis-列表
电气数据|IEEE118(含风能太阳能)
VMware Tools installation error: unable to automatically install vsock driver
JMeter BeanShell的基本用法 一下语法只能在beanshell中使用
XSS learning XSS lab problem solution
[detailed] several ways to quickly realize object mapping
leetcode刷题_反转字符串中的元音字母
MATLB|实时机会约束决策及其在电力系统中的应用
Spir - V premier aperçu
伦敦银走势中的假突破
Docker compose配置MySQL并实现远程连接
Kotlin basics 1
Vulhub vulnerability recurrence 74_ Wordpress