rohitg00/agentmemory · error
${missing} not found. Cannot auto-install iii-engine.
Error message
${missing} not found. Cannot auto-install iii-engine. What it means
Before auto-installing iii-engine on non-Windows systems, runIiiInstaller requires three system tools: sh, curl, and tar (used to download and extract the release archive). If any is absent, it lists exactly which ones are missing and warns that iii-engine cannot be auto-installed, returning failure without downloading anything.
Source
Thrown at src/cli.ts:1398
if (IS_WINDOWS || isZipAsset) {
p.log.info(
`Auto-install unavailable on ${platform()} — ${asset} isn't tar-compatible. Install manually:\n` +
` 1. Download ${releaseUrl}\n` +
` 2. Extract iii.exe and place it on PATH (e.g. %USERPROFILE%\\.local\\bin)\n` +
`Or use Docker: docker pull iiidev/iii:${IIPINNED_VERSION}`,
);
return { ok: false, binPath: null };
}
const shBin = whichBinary("sh");
const curlBin = whichBinary("curl");
const tarBin = whichBinary("tar");
if (!shBin || !curlBin || !tarBin) {
const missing = [!shBin && "sh", !curlBin && "curl", !tarBin && "tar"]
.filter(Boolean)
.join(", ");
p.log.warn(`${missing} not found. Cannot auto-install iii-engine.`);
return { ok: false, binPath: null };
}
const binDir = agentmemoryBinDir();
const binPath = privateIiiPath();
const installCmd = [
`mkdir -p "${binDir}"`,
`curl -fsSL "${releaseUrl}" | tar -xz -C "${binDir}"`,
`chmod +x "${binPath}"`,
].join(" && ");
const installerOk = runCommand(shBin, ["-c", installCmd], {
label: `Installing iii-engine v${IIPINNED_VERSION} (pinned)`,
optional: true,
});
if (!installerOk) {
p.log.warn(
`iii-engine installer failed. Fallbacks: Docker (\`docker pull iiidev/iii:${IIPINNED_VERSION}\`) or download manually from https://github.com/iii-hq/iii/releases/tag/iii%2Fv${IIPINNED_VERSION}.`,
);View on GitHub (pinned to e04ba88819)
Solutions
- Install the missing tools: e.g. `apt-get install -y curl tar` (or apk equivalent); sh is almost always present on Unix.
- Run the CLI from a fuller base image or standard shell environment.
- Install iii-engine manually (Docker `docker pull iiidev/iii:<pinned>` or download the release binary) so auto-install is skipped.
- Fix the PATH so the tools already installed are discoverable (`which tar` should succeed).
Example fix
// before: tar missing in slim image $ docker run node:alpine agentmemory start # tar not found // after $ RUN apk add --no-cache curl tar # then re-run agentmemory start
Defensive patterns
Strategy: validation
Validate before calling
import { execFileSync } from "node:child_process";
const missing = ["sh", "curl", "tar"].filter((b) => {
try { execFileSync("which", [b], { stdio: "ignore" }); return false; } catch { return true; }
});
if (missing.length) console.error(`Pre-install: apt-get install -y ${missing.join(" ")}`); Prevention
- Use standard base images (not scratch/distroless) for anything running the CLI.
- Add curl and tar to your Dockerfile if the image lacks them.
- Do not strip /usr/bin utilities in hardened images used for dev tooling.
- Confirm PATH includes standard binary dirs.
When it happens
Trigger: Auto-install path runs and whichBinary returns null for sh, curl, or tar — e.g. distroless/minimal containers lacking tar or curl, or Windows-like environments without sh reaching this path.
Common situations: Scratch/Docker images built without coreutils/tar; CI runners with stripped images; tampered PATH excluding /usr/bin; security-hardened containers dropping shell utilities.
Related errors
- npm not found on PATH. Install manually: npm install -g @age
- curl or sh not found. Install manually: ${iiiConsoleInstal
- iii-engine binary not available for ${platform()}/${process.
- iii-engine installer failed. Fallbacks: Docker (`docker pull
- iii-engine binary not found locally.
AI-assisted analysis of rohitg00/agentmemory@e04ba88819 (2026-08-30).
Data as JSON: /api/errors/e73e3e222230c46f.
Report an issue: GitHub.