g icon indicating copy to clipboard operation
g copied to clipboard

w11的go version就是不生效

Open Fajar-w opened this issue 3 years ago • 3 comments

image 切换然后go version image path的环境变量 image

Fajar-w avatar Aug 29 '22 11:08 Fajar-w

很明显,你的PATH环境变量设置错了。起码应该把D:\exe\g\golang\.g\go\bin加入PATH

voidint avatar Aug 29 '22 23:08 voidint

很明显,你的PATH环境变量设置错了。起码应该把D:\exe\g\golang\.g\go\bin加入PATH

GOROOT = D:\exe\g\golang.g\go %GOROOT%\bin 不是 D:\exe\g\golang.g\go\bin的意思 ??

Fajar-w avatar Aug 30 '22 02:08 Fajar-w

这截图我算是看明白了:使用g切换了新的版本,但是go version的输出依然是切换前的版本。最可能的就是path中包含了之前安装的其他go版本,并且它的查找优先级更高。建议你通过类似 Unix/Linux 下的which命令查找下go可执行文件的指向路径。这种应该不难排查。

voidint avatar Aug 30 '22 07:08 voidint