{"record":{"id":"cd21b482f126c15c","repo":"lima-vm/lima","slug":"limactl-is-running-under-rosetta-please-reinstall","errorCode":null,"errorMessage":"limactl is running under rosetta, please reinstall lima with native arch","messagePattern":"limactl is running under rosetta, please reinstall lima with native arch","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/limactl/main.go","lineNumber":146,"sourceCode":"\t\tSilenceUsage:      true,\n\t\tSilenceErrors:     true,\n\t\tDisableAutoGenTag: true,\n\t}\n\trootCmd.PersistentFlags().String(\"log-level\", \"\", \"Set the logging level [trace, debug, info, warn, error]\")\n\trootCmd.PersistentFlags().String(\"log-format\", \"text\", \"Set the logging format [text, json]\")\n\trootCmd.PersistentFlags().Bool(\"debug\", false, \"Debug mode\")\n\t// TODO: \"survey\" does not support using cygwin terminal on windows yet\n\trootCmd.PersistentFlags().Bool(\"tty\", isatty.IsTerminal(os.Stdout.Fd()), \"Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.\")\n\trootCmd.PersistentFlags().BoolP(\"yes\", \"y\", false, \"Alias of --tty=false\")\n\trootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {\n\t\tif err := processGlobalFlags(rootCmd); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif osutil.IsBeingRosettaTranslated() && cmd.Parent().Name() != \"completion\" && cmd.Name() != \"generate-doc\" && cmd.Name() != \"validate\" {\n\t\t\t// running under rosetta would provide inappropriate runtime.GOARCH info, see: https://github.com/lima-vm/lima/issues/543\n\t\t\t// allow commands that are used for packaging to run under rosetta to allow cross-architecture builds\n\t\t\treturn errors.New(\"limactl is running under rosetta, please reinstall lima with native arch\")\n\t\t}\n\n\t\t// Make sure either $HOME or $LIMA_HOME is defined, so we don't need\n\t\t// to check for errors later\n\t\tdir, err := dirnames.LimaDir()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tnfs, err := fsutil.IsNFS(dir)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif nfs {\n\t\t\tlogrus.Warn(\"LIMA_HOME should not be on an NFS mount\")\n\t\t}\n\n\t\tif cmd.Flags().Changed(\"yes\") && cmd.Flags().Changed(\"tty\") {\n\t\t\treturn errors.New(\"cannot use both --tty and --yes flags at the same time\")","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/cmd/limactl/main.go#L128-L164","documentation":"On macOS, limactl refuses to run under Rosetta 2 binary translation except for a small allowlist of commands (completion, generate-doc, validate), because the translated runtime reports the wrong GOARCH and can break VM architecture decisions (lima-vm/lima issue #543). The check is osutil.IsBeingRosettaTranslated() in the PersistentPreRunE in cmd/limactl/main.go:146.","triggerScenarios":"Executing an x86_64 limactl binary on an Apple Silicon Mac (or vice versa via Rosetta) with any command other than completion, generate-doc, or validate.","commonSituations":"Installing the amd64 Homebrew/Intel build of Lima on an M-series Mac; copying a binary from an Intel machine; shell or terminal app forced to run under Rosetta; downloading the wrong release artifact.","solutions":["Install the native-arm64 build of Lima (`brew install lima` on Apple Silicon picks the right arch)","Check the binary arch with `file $(which limactl)` and replace an x86_64 binary with the arm64 one","If a packaging task genuinely needs cross-arch, use the allowed commands (validate, generate-doc, completion) or run in a VM/container","Ensure the terminal itself isn't launched via Rosetta (Finder > Get Info > Open using Rosetta)"],"exampleFix":"// before\n$ file $(which limactl)\n... Mach-O 64-bit executable x86_64   # on Apple Silicon\n// after\n$ brew reinstall lima\n$ file $(which limactl)\n... Mach-O 64-bit executable arm64","handlingStrategy":"validation","validationCode":"# refuse to run translated builds in scripts\nARCH=$(uname -m)\nBIN_ARCH=$(file \"$(command -v limactl)\" | grep -o 'arm64\\|x86_64' | head -1)\n[ \"$ARCH\" = \"$BIN_ARCH\" ] || { echo \"Rosetta-translated limactl; reinstall native arch\" >&2; exit 1; }","typeGuard":null,"tryCatchPattern":"if err := cmd.Execute(); err != nil {\n\tif strings.Contains(err.Error(), \"running under rosetta\") {\n\t\tfmt.Fprintln(os.Stderr, \"install the native-arm64 lima build (brew install lima)\")\n\t}\n\tos.Exit(1)\n}","preventionTips":["On Apple Silicon install the arm64 build (brew install lima)","Verify with `file $(which limactl)` that arch matches uname -m","Don't launch terminals or the binary with 'Open using Rosetta'","Download release artifacts matching your CPU arch"],"tags":["cli","macos","rosetta","architecture"],"backgroundTag":"rosetta-translation-unsupported","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}