ubuntu下安装go环境的环境丢失问题
Mr_DR
2020-05-27
ubuntu下安装go环境
安装完成之后,第二天进入系统提示:
The program ‘go’ is currently not installed.
然后重新配置设置全局路径
vim ~/.bashrc
export GOPATH=/usr/local/go
export PATH=GOPATH/bin:GOPATH/bin:GOPATH/bin:PATH
source ~/.bashrc
二次更改原因:
go version
#提示warning
warning: GOPATH set to GOROOT (/usr/local/go) has no effect
go version go1.13.4 linux/amd64
vim ~/.bashrc
#变量修改为一下配置
export GOROOT=/usr/local/go
export GOPATH=PATH:PATH:PATH:GOROOT/bin
这个为啥每天go语言都是失效的,每天都在配环境路径,现在变成了20分钟一次,有没有遇到相关问题来帮忙解决下,服务器萌新,等待解答
写回答