当前位置:网站首页>go版本升级
go版本升级
2022-07-30 05:14:00 【繁华哟】
Window版本的go升级
- 首先到Go语言中文网下载windows对应的go版本,此处将go升级到1.18.版本

- 直接下载安装,安装之前会提示卸载旧版本,确定后直接安装在原来的Go安装目录 ,直接覆盖
- 安装成功后,在终端输入go version即可看到go的版本已经升级

升级之后,我的开发环境idea中出现了需要重新配置GOROOT的问题
idea中GOROOT的设置即为go的安装位置,本文中go的安装位置为D:asic_toolGo,但选择后仍然出现如下的报错:The selected directory is not a valid home for Go SDK
此处报错的解决参考此博主的文章【Go系列】Go安装与环境配置,The selected directory is not a valid home for Go SDK - 进入Go的安装目录,比如本文为D:asic_toolGosrc untimeinternalsys,打开zversion.go文件,加上自己的版本号即可

idea中某些import的包出现了以下的类似一些报错:
Found several packages [http, main] in ‘D:/basic_tool/Go/src/net/http;D:/basic_tool/Go/src/net/http’
貌似是因为idea的版本也有些低,倒是不影响使用,我就没管哈哈哈哈
Linux版本go升级
若使用的是yum安装的golang,则直接使用yum remove go即可卸载掉旧版本的golang
同样的,到Go语言中文网下载windows对应的go版本

tar -zxvf go1.18.3.linux-amd64.tar.gz进行安装包的解压
将解压的安装包移动到/usr/local目录
为GOROOT设置环境变量
export GOROOT=/usr/local/go
export PATH= P A T H : PATH: PATH:GOROOT/bin
source /etc/profile此时执行go version即可看到安装成功

先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- 解读 Kylin 3.0.0 | 更敏捷、更高效的 OLAP 引擎
- 模拟问题(中)
- (RCE) Remote Code/Command Execution Vulnerability Vulnerability Exercise
- GO language study notes one
- 力扣344-反转字符串——双指针法
- 容器化 | 构建 RadonDB MySQL 集群监控平台
- WPF recursively obtains the list of specified control types in the form
- 如何让 (a == 1 && a == 2 && a == 3) 的值为true?
- 双指针问题(下)
- 22. 为什么需要消息队列?使用消息队列有什么好处?
猜你喜欢

Small program npm package--API Promise

给小白的 PG 容器化部署教程(下)

Discourse Custom Header Links

mysql隔离级别

力扣05-替换空格——字符串问题

小程序npm包--API Promise化

Alibaba Cloud's EasyNLP Chinese text image generation model takes you to become an artist in seconds

Learning of redis_Basic part

Hexagon_V65_Programmers_Reference_Manual (10)

Code readability, pre-checks, comments and summaries
随机推荐
Codeforces Round #809 (Div. 2) A~D
Divide and conquer. L2-025
RadonDB MySQL on K8s 2.1.4 发布!
LeetCode Algorithm 328. Parity linked list
mysql隔离级别
Hexagon_V65_Programmers_Reference_Manual (12)
容器化|在 S3 备份恢复 RadonDB MySQL 集群数据
22. 为什么需要消息队列?使用消息队列有什么好处?
即刻报名|前沿技术探索:如何让 Spark 更强劲、更灵活
容器化 | 在 KubeSphere 中部署 MySQL 集群
Detailed explanation of REUSE_ALV_GRID_DISPLAY
ThinkPHP高仿蓝奏云网盘系统源码/对接易支付系统程序
DLL description (1)
Simulation problem (middle)
RadonDB MySQL Kubernetes 2.2.0 发布!
[3D Detection Series-PointRCNN] Reproduces the PointRCNN code, and realizes the visualization of PointRCNN3D target detection, including the download link of pre-training weights (starting from 0 and
Hexagon_V65_Programmers_Reference_Manual (14)
Alibaba Cloud's EasyNLP Chinese text image generation model takes you to become an artist in seconds
SVN 查看用户名密码
Unity stepping on the pit record - the use of GetComponent