英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论