Golang在liteIDE中要求提供GOROOT。

huangapple go评论80阅读模式
英文:

Golang asks for GOROOT in liteIDE

问题

我在Windows 10上使用Go,并遇到了问题。

我尝试使用LiteIDE运行一个基本的“Hello, world” Go程序,但运行时返回以下错误:

C:/Program Files (x86)/Go/bin/go.exe build [C:/Users/MyUser/Desktop/Go_projects]
go: cannot find GOROOT directory: c:\go
Error: process exited with code 2.

很多人建议不设置GOROOT路径变量,这意味着Go应该可以正常工作,但LiteIDE却不行。
以防万一,我已将GOPATH设置为C:\Program Files (x86)\Go\bin。

英文:

I use Go on Windows 10 and am having problem.

I've tried running a basic 'Hello, world' Go program using LiteIDE but when run it returns next error:

C:/Program Files (x86)/Go/bin/go.exe build [C:/Users/MyUser/Desktop/Go_projects]
go: cannot find GOROOT directory: c:\go
Error: process exited with code 2.

A lot of people recommend not setting up GOROOT path variable, meaning Go should work fine without it, yet LiteIDE doesn't.
Just in case, I had set up GOPATH to C:\Program Files (x86)\Go\bin

答案1

得分: 0

我已经在liteIDE设置中从win32.env中删除了GOROOT,并且一切似乎都正常工作。
查看 > 选项 > LiteEnv > 双击 win32.env > 删除 GOROOT

我还不知道这个操作的长期后果,但目前这个解决方案似乎有效。

英文:

I had removed GOROOT from win32.env in liteIDE settings and everything seemed to just work.
View > Options > LiteEnv > double-click win32.env > delete GOROOT

I don't know the longlasting consequences of this action yet, but for now this solution seems to work.

huangapple
  • 本文由 发表于 2021年12月6日 19:55:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/70245094.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定