go-delve/delve · error
can not run under Rosetta, check that the installed build of
Error message
can not run under Rosetta, check that the installed build of Go is right for your CPU architecture
What it means
CheckRosetta detects when a Go binary compiled for amd64 is being transparently translated by Apple's Rosetta on Apple Silicon. Delve requires ptrace-level access that does not work reliably under Rosetta translation, so it refuses to run rather than misbehave. The error tells the developer their Go toolchain/build does not match the actual CPU architecture.
Source
Thrown at pkg/proc/macutil/rosetta_darwin.go:16
package macutil
import (
"errors"
"syscall"
)
// CheckRosetta returns an error if the calling process is being translated
// by Apple Rosetta.
func CheckRosetta() error {
pt, err := syscall.Sysctl("sysctl.proc_translated")
if err != nil {
return nil
}
if len(pt) > 0 && pt[0] == 1 {
return errors.New("can not run under Rosetta, check that the installed build of Go is right for your CPU architecture")
}
return nil
}
View on GitHub (pinned to a23773e6c3)
Solutions
- Install native arm64 builds of both Go and delve (go.dev/dl arm64 package, darwin/arm64 delve release)
- Check with 'file $(which dlv)' and 'go env GOARCH' that both are arm64
- Reinstall the Go toolchain natively (remove Rosetta-installed versions)
- Run from a native arm64 terminal, not one running under Rosetta
Example fix
// before (Rosetta shell) $ go install github.com/go-delve/delve/cmd/dlv@latest # GOARCH=amd64 // after $ arch -arm64 /bin/zsh go install github.com/go-delve/delve/cmd/dlv@latest # GOARCH=arm64
Defensive patterns
Strategy: validation
Validate before calling
// preflight in a script before launching dlv if [ "$(sysctl -n sysctl.proc_translated 2>/dev/null || echo 0)" = "1" ]; then echo "Running under Rosetta - reinstall native arm64 Go and delve"; exit 1 fi
Try / catch
if err := macutil.CheckRosetta(); err != nil {
fmt.Fprintf(os.Stderr, "refusing to start: %v\n", err)
os.Exit(1)
} Prevention
- Install darwin/arm64 builds of Go and delve on Apple Silicon
- Verify with 'file $(which dlv)' and 'go version' that both are arm64
- Avoid installing Go via Rosetta-targeted package managers
- Use native terminals (not x86_64 terminal emulators) for debugging sessions
When it happens
Trigger: Running an amd64 delve (or delve process launched under translation) on an arm64 Mac; the sysctl 'sysctl.proc_translated' returns 1 indicating Rosetta translation.
Common situations: Downloading an amd64 delve release or Homebrew x86_64 build on an M1/M2/M3 Mac; Go toolchain installed as x86_64 under Rosetta; running through a terminal emulator in x86 mode.
Related errors
- can not run under Rosetta, check that the terminal/shell in
- could not deliver signal:
- could not resume task
- hardware breakpoints exhausted
- architecture mismatch between core file (%#x) and executable
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/753272289944d2e0.
Report an issue: GitHub.