英文:
go darwin/arm64 SDK in the MacOS
问题
我在苹果芯片的 macOS M1 机器上安装了 Goland 和 Go SDK。在终端中,我得到了以下输出:
$ go version
go version go1.18.3 darwin/amd64
当我尝试调试 Go 应用程序时,出现了以下错误:
Debugging programs compiled with go version go1.18.3 darwin/amd64 are not supported. Use go SDK for darwin/arm64.
我该如何在 macOS 上安装 go darwin/arm64 SDK?
英文:
I installed the Goland for the Apple silicon and go SDK in the macOS M1 machine. In the terminal I get -
$ go version
go version go1.18.3 darwin/amd64
When I try to debug the go application, I get the following error -
Debugging programs compiled with go version go1.18.3 darwin/amd64 are not supported. Use go SDK for darwin/arm64.
How do I install the go darwin/arm64 SDK in the MacOS?
答案1
得分: 8
这是因为你下载了错误的文件,因为amd64和arm64之间有区别,请尝试下载稳定版本的arm64版本。
提示:在安装arm64版本之前,请尝试卸载amd64版本。
英文:
That's because you downloaded the wrong file because there is a difference between amd64 and arm64, try downloading the arm64 version in the stable version.
ps : please try to uninstall the amd64 version before installing the arm64 version
答案2
得分: 5
我从以下页面安装了正确的版本 -
答案3
得分: 1
我遇到了这个问题,不是因为我使用了错误的Go SDK,而是因为我使用了错误的GoLand版本。它不是一个通用应用程序,而且(至少截至今天)下载页面会自动提供错误的版本。我不得不找到https://www.jetbrains.com/go/download/#section=mac,并点击“.dmg”旁边的小箭头,以选择Apple Silicon版本而不是Intel版本。
但是,要给予应用的开发者应得的赞赏:Apple Silicon版本非常出色。它的响应速度更快。
英文:
I had this problem, not because I had the wrong Go SDK, but because I had the wrong build of GoLand. It's not a universal app, and (at least as of today) the download page will automatically try to supply the wrong one. I had to find https://www.jetbrains.com/go/download/#section=mac, and click on the little down arrow next to ".dmg" in order to choose the Apple Silicon build instead of the Intel one.
But, credit where it's due: the Apple Silicon build is great. It's far snappier.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论