abiosoft/colima · error

lima compatibility error: %w

Error message

lima compatibility error: %w

What it means

PreRunE gate of `colima start`: core.LimaVersionSupported() shells out to `limactl info`, decodes its JSON, and compares the version against colima's minimum supported Lima release. The wrapped error is one of: limactl missing/not executable ('error checking Lima version'), unparseable output ('error decoding limactl info json'), or an unsupported (too old) Lima version.

Source

Thrown at cmd/start.go:92

		}

		if app.Active() {
			if !cli.Prompt("colima is currently running, restart to apply changes") {
				return nil
			}
			if err := app.Stop(false); err != nil {
				return fmt.Errorf("error stopping :%w", err)
			}
			// pause before startup to prevent race condition
			time.Sleep(time.Second * 3)
		}

		return start(app, conf)
	},
	PreRunE: func(cmd *cobra.Command, args []string) error {
		// validate Lima version
		if err := core.LimaVersionSupported(); err != nil {
			return fmt.Errorf("lima compatibility error: %w", err)
		}

		// combine args and current config file(if any)
		prepareConfig(cmd)

		// validate config
		if err := configmanager.ValidateConfig(startCmdArgs.Config); err != nil {
			return fmt.Errorf("error in config: %w", err)
		}

		// persist in preparation for application start
		if startCmdArgs.Flags.SaveConfig {
			if err := configmanager.Save(startCmdArgs.Config); err != nil {
				return fmt.Errorf("error preparing config file: %w", err)
			}
		}

		// validate and set downloader if flag is specified (takes precedence over env var)

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Check what happened: `limactl info` — if 'command not found', install lima
  2. Upgrade lima to colima's minimum: `brew upgrade lima` (colima's brew formula pins a matching lima)
  3. If installed outside brew, ensure the limactl binary dir is on PATH and its version >= the version referenced in core.LimaVersionSupported
  4. Reinstall colima so its lima dependency resolves: `brew reinstall colima`

Example fix

# before
$ colima start
Error: lima compatibility error: error checking Lima version: exec: "limactl": executable file not found in $PATH

# after
$ brew install lima   # or: brew upgrade lima
$ colima start
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight the exact check colima performs in PreRunE
if _, err := exec.LookPath("limactl"); err != nil {
    log.Fatal("limactl not found in PATH; install/upgrade lima first")
}
out, err := exec.Command("limactl", "info").Output()
if err != nil {
    log.Fatalf("limactl info failed: %v", err)
}
var info struct{ Version string `json:"version"` }
if err := json.Unmarshal(out, &info); err != nil {
    log.Fatalf("unexpected limactl output: %v", err)
}

Prevention

When it happens

Trigger: `colima start` on a machine where limactl is not in PATH; lima installed but older than the version colima was built against; limactl printing unexpected output (broken install); colima upgraded via brew without its lima dependency.

Common situations: Fresh machine with colima but no lima; partial brew upgrade where colima moved ahead of lima; Nix/manual installs with stale limactl on PATH; development lima builds (HEAD) are allowed through with only a warning.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/62bc9d49f09bc94b. Report an issue: GitHub.