macbook golang的debug模式不好使

因为新版mac运用了m1芯片,所以golang在debug的时候会有报错,具体如下:

can not run under rosetta check that the installed build of go is right for your cpu architecture

 

就是cpu架构的问题,所以我们安装arm架构的golang版本即可。具体版本见下图:

 

 下载地址:https://golang.google.cn/dl/go1.17.1.darwin-arm64.pkg

 

如果用goland也需要下载对应arm架构版本的

 

posted on 2021-09-29 20:24  asif  阅读(2802)  评论(0编辑  收藏  举报

导航