Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 689 Bytes

1.goland_debug_fail.md

File metadata and controls

18 lines (10 loc) · 689 Bytes

1 、goland 本地调试报错

使用goland 进行本地调试的时候报错:

could not launch process: can not run under Rosetta, check that the installed build of Go is right for your CPU architecture

问题定位

输入命令 go env GOARCH , 显示 amd64, 查了下资料, amd64 是go mac 的 x86架构版本。 而我的电脑是M2芯片的, 应该使用arm64 版本的go。

我是用homebrew 安装的go , 对于m2 芯片的电脑 使用homebrew 安装的时候, 默认会安装 amd64 架构版本的 go。

问题修复

把go 卸载了, 从官网上下载一个arm64 的安装包重新下载。 注意要重新设置goroot 路径。