{"record":{"id":"aa38183eeb66483d","repo":"iOfficeAI/OfficeCLI","slug":"officecli-install-failed-run-manually-curl","errorCode":null,"errorMessage":"officecli install failed. Run manually:\n    curl -fsSL ${INSTALL_SH_MIRROR} | bash","messagePattern":"officecli install failed\\. Run manually:\n    curl -fsSL (.+?) \\| bash","errorType":"error_code","errorClass":"OfficeCliError","httpStatus":null,"severity":"error","filePath":"sdk/node/index.js","lineNumber":637,"sourceCode":"    const ps = `$s = try { irm '${INSTALL_PS1_MIRROR}' } catch { irm '${INSTALL_PS1_GITHUB}' }; $s | iex`;\n    const r = spawnSync('powershell', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', ps], {\n      stdio: 'inherit',\n    });\n    if (r.status !== 0) {\n      throw new OfficeCliError(\n        r.status == null ? -1 : r.status,\n        `officecli install failed. Run manually:\\n    irm ${INSTALL_PS1_MIRROR} | iex`\n      );\n    }\n    return;\n  }\n  process.stderr.write(`Installing officecli via ${INSTALL_SH_MIRROR} (github fallback) ...\\n`);\n  // (curl mirror || curl github) | bash — the subshell emits whichever script\n  // fetch succeeds; the group keeps the pipe bound to the whole fallback.\n  const sh = `(curl -fsSL ${INSTALL_SH_MIRROR} 2>/dev/null || curl -fsSL ${INSTALL_SH_GITHUB}) | bash`;\n  const r = spawnSync('bash', ['-c', sh], { stdio: 'inherit' });\n  if (r.status !== 0) {\n    throw new OfficeCliError(\n      r.status == null ? -1 : r.status,\n      `officecli install failed. Run manually:\\n    curl -fsSL ${INSTALL_SH_MIRROR} | bash`\n    );\n  }\n}\n\nmodule.exports = { open, create, install, Document, OfficeCliError, pipePaths };\n","sourceCodeStart":619,"sourceCodeEnd":645,"githubUrl":"https://github.com/iOfficeAI/OfficeCLI/blob/1ced45e900782c5083ed550ddf328ee974e425e7/sdk/node/index.js#L619-L645","documentation":"Thrown by install() on macOS/Linux when the bash-driven install (install.sh via `(curl mirror || curl github) | bash`) exits non-zero. It surfaces the failure and points the user at the manual curl | bash invocation. This is the Unix counterpart of error 10.","triggerScenarios":"curl is absent or blocked; no network egress to the mirror and GitHub; bash is missing/unusual; the script errors partway (cannot write ~/.local/bin); a corporate TLS inspector rewrites the script; curl returns non-zero because both URLs 404.","commonSituations":"Minimal containers without curl; air-gapped Linux; a proxy that strips/modifies the downloaded script; read-only HOME.","solutions":["Run the manual command: `curl -fsSL https://d.officecli.ai/install.sh | bash` and read its output.","If curl is missing, install it (apt-get/yum install curl) or substitute wget.","For proxy/TLS issues, set HTTPS_PROXY or bypass the inspector for d.officecli.ai.","Ensure HOME and ~/.local/bin are writable; add ~/.local/bin to PATH after install."],"exampleFix":"# before: install() -> officecli install failed. Run manually: curl -fsSL ... | bash\n# after: run the installer directly with proxy set\nHTTPS_PROXY=http://proxy:8080 curl -fsSL https://d.officecli.ai/install.sh | bash\nexport PATH=\"$HOME/.local/bin:$PATH\"","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Fall back to the documented manual curl|bash command\ntry { require('@officecli/sdk').install(); }\ncatch (e) {\n  if (/install failed/i.test(e.message)) {\n    require('child_process').execSync('bash -c \"curl -fsSL https://d.officecli.ai/install.sh | bash\"', { stdio: 'inherit' });\n  } else throw e;\n}","preventionTips":["Bake the install.sh step into your Dockerfile so runtime never depends on it.","Ensure curl and bash are present and ~/.local/bin is writable + on PATH.","Set HTTPS_PROXY in proxied environments."],"tags":["install","unix","bash","curl","network"],"backgroundTag":null,"analyzedSha":"1ced45e900782c5083ed550ddf328ee974e425e7","analyzedAt":"2026-08-13T13:01:07.193Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}