当前位置:网站首页>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
边栏推荐
- About error 2003 (HY000): can't connect to MySQL server on 'localhost' (10061)
- [solved] how to generate a beautiful static document description page
- UE4 unreal engine, editor basic application, usage skills (IV)
- How to get the PHP version- How to get the PHP Version?
- internship:项目代码所涉及陌生注解及其作用
- 【已解决】如何生成漂亮的静态文档说明页
- Modify the ssh server access port number
- 记一个 @nestjs/typeorm^8.1.4 版本不能获取.env选项问题
- ClickOnce 不支持请求执行级别“requireAdministrator”
- 剑指 Offer 12. 矩阵中的路径
猜你喜欢

Basic operations of databases and tables ----- default constraints

Win10 add file extension

【已解决】如何生成漂亮的静态文档说明页

Force buckle 9 palindromes

Huawei Hrbrid interface and VLAN division based on IP

基於DVWA的文件上傳漏洞測試

C web page open WinForm exe

3D视觉——4.手势识别(Gesture Recognition)入门——使用MediaPipe含单帧(Singel Frame)和实时视频(Real-Time Video)

Docker compose configures MySQL and realizes remote connection

MATLB|实时机会约束决策及其在电力系统中的应用
随机推荐
Docker compose configures MySQL and realizes remote connection
MUX VLAN configuration
Docker compose配置MySQL并实现远程连接
Basic operations of database and table ----- set the fields of the table to be automatically added
Redis-列表
Paddle framework: paddlenlp overview [propeller natural language processing development library]
什么是弱引用?es6中有哪些弱引用数据类型?js中的弱引用是什么?
Condition and AQS principle
3D视觉——4.手势识别(Gesture Recognition)入门——使用MediaPipe含单帧(Singel Frame)和实时视频(Real-Time Video)
VMware Tools installation error: unable to automatically install vsock driver
NLP第四范式:Prompt概述【Pre-train,Prompt(提示),Predict】【刘鹏飞】
How to see the K-line chart of gold price trend?
Use of crawler manual 02 requests
Leetcode 208. Implement trie (prefix tree)
leetcode刷题_平方数之和
MCU lightweight system core
Code Review关注点
Vulhub vulnerability recurrence 74_ Wordpress
[flask] static file and template rendering
3D vision - 4 Getting started with gesture recognition - using mediapipe includes single frame and real time video