-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlv debug return error on mac m1 #2604
Comments
Delve can not run under Rosetta, use |
I am using Apple M1 chip laptop
It throws the same error when using Not sure what else might be wrong, can you please guide @aarzilli |
I also encountered the same problem, I also used the m1 chip |
This doc helped me resolve my issue - Edit: Not sure why are people disliking the comment, I have simply written what worked for me (doesn't necessarily mean that it will work for you) |
the issue still exist :( |
why is this issue closed? still doesn't work on m1 |
I was able to fix it myself, I had installed go |
I tried installing arm64. Still issue persists. |
@vamseeakkiraju after switching to arm -> install your go tools in VScode again. Then it will run fine |
why does this issue keep getting closed? It is not working on M1 even with all the above suggestions |
@gt-ow-1989 - worked for me. i switched from amd64 to arm64. you can get it here (https://go.dev/dl/go1.17.8.darwin-arm64.pkg) |
Uninstall Golang(AMD-64 version).
|
Only do this if you have installed not installed the "-arm64" version from go website. Please delete the below listed directories. Navigate to these directories in Finder App, on your Mac and delete.
For M1 Chip based, Macs we need to install the “go1.18.darwin-arm64.pkg” version. Download and install from this link. https://go.dev/dl/go1.18.darwin-arm64.pkg If you use Visual Code: Reinstall your Visual Code Extensions, and then, you should be able to debug, as I am able to. Cheers |
I had same problem just now. I was able to solve it in 3 steps: [1] Download and install the ARM64 installer package from https://golang.org - https://go.dev/dl/go1.18.darwin-arm64.pkg Step 1 ensures that you have the M1 compatible version of Go. |
If you use M1 chip and use goland IDE:
|
Thank you, I got inspiration from your answer. Indeed, my vscode is intel version. When I downloaded arm version vscode again, my debug was normal. |
Also running on an M1 chip here. I believe my issue was not having the GOARCH environment variable set when I installed dlv. Despite that my installation of Go was correct, it would appear that without GOARCH being set,
VSCode users: note that the Go extension's |
I have a M1 chip too and have Go 1.15.15 which is only available in amd64. Is there anyway to get rid of this error? |
why don't you use latest version? maybe go 1.15 release before M1 chip |
I need 1.15.15 for what I am working on, so I did not know if there was a different way to get rid of the error |
If you are a goland user, please check if goland is using the apple version. |
This is what worked for me. Thanks to this poster. I ran "go get -u github.com/go-delve/delve/cmd/dlv" in the terminal after installing the ARM version of Go and then it started working. |
mac m1 芯片的系统,安装 arm架构的go可解决 |
I had same problem. |
So what the solution for this error???
removing and reinstalling go, didn't help |
What worked for me was to not install dlv via VS Code, but to manually install the specific version of dlv with the go tool. In your go directory first remove existing dlv installation. Then install More installation here: https://github.com/go-delve/delve/blob/master/Documentation/installation/README.md |
My problem solved by installing go release for ARM64 architecture. After installation , change GOROOT in IDE to new installed one. |
✅ SOLUTION ✅The issue is that you had installed the non-M1 version of GoLang and/or VSCode. If you didn't install both GoLang and VSCode using the arm64 distribution then that is where the problem is. To fix this issue:
That's it! You should be good to go now 👍 |
Thank you, it worked for me! |
go version: go1.16.6 darwin/amd64
dlv version: 1.7.0
dlv debug
error:could not launch process: can not run under Rosetta, check that the installed build of Go is right for your CPU architecture
The text was updated successfully, but these errors were encountered: