在MacOS上使用go darwin/arm64 SDK。

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

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版本。

在MacOS上使用go darwin/arm64 SDK。

英文:

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

在MacOS上使用go darwin/arm64 SDK。

答案2

得分: 5

我从以下页面安装了正确的版本 -

https://go.dev/dl/

在MacOS上使用go darwin/arm64 SDK。

英文:

I installed the correct version from the page -

https://go.dev/dl/

在MacOS上使用go darwin/arm64 SDK。

答案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.

huangapple
  • 本文由 发表于 2022年7月24日 14:16:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/73096194.html
匿名

发表评论

匿名网友

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

确定