Install: 'inappropriate ioctl for device' when running install.sh
If `curl ... | sudo bash` prints repeated 'inappropriate ioctl for device' and the OpenClaw installer fails or behaves oddly, rerun the installer with a real TTY (or disable gum), or install via npm directly.
Symptoms
- While installing with the one-liner, you see repeated:
inappropriate ioctl for device
- The install may still continue, but can fail later. Older installer output sometimes included a misleading historical
retry such as
npm install openclaw@latest failed; retrying openclaw@next; do not treat@nextas the stable retry path. - This is most common when piping the script into
sudo bash.
Cause
The installer is doing interactive / TTY-oriented work (terminal state changes + UI via gum).
When you run curl ... | sudo bash, stdin often isn’t a real TTY, so those steps print inappropriate ioctl for device.
Fix
1) Run the installer with a real TTY (recommended)
Download the script, then run it normally (interactive shell):
curl -fsSL https://openclaw.ai/install.sh -o /tmp/openclaw-install.sh
bash /tmp/openclaw-install.sh
2) Disable gum UI
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-gum
3) If Node is already installed, install via npm directly
Use this only after node -v and npm -v work in the shell where you are installing:
npm i -g openclaw@latest
openclaw gateway install
Verify
openclaw --version
openclaw gateway status
If the installer still fails, capture the lines after the first WARN npm install ... failed message (the ioctl lines are often just noise).