To fix this and successfully install or run OpenClaw, choose the method that matches your intended setup:
Option 1: Use the Native Windows Installation (Recommended)
If you are currently trying to run an installation script like
curl ... | bash, use the OpenClaw official PowerShell command instead:- Open PowerShell as Administrator (Search for "PowerShell", right-click it, and select Run as Administrator).
- Run this command:powershell
iwr -useb https://openclaw.ai/install.ps1 | iex - If you get an execution policy error, run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserand then try the install command again.
Option 2: Install Git Bash
If you specifically need the
bash command available in your terminal, the easiest way is to install Git for Windows, which includes Git Bash:- Download & Install: Get the installer from Git for Windows.
- Usage: After installation, you can type
bashdirectly into PowerShell to enter a Bash environment, or use the "Git Bash" application from your Start menu.
Option 3: Use Windows Subsystem for Linux (WSL)
For a "real" Linux environment on Windows, which is often more stable for OpenClaw:
- Open PowerShell as Admin and run:
wsl --install. - Restart your computer when prompted.
- Open the newly installed Ubuntu app from your Start menu.
- Inside the Ubuntu terminal, you can now run the Bash-based command:bash
curl -fsSL https://openclaw.ai/install.sh | bash
Troubleshooting "Command Not Found" after installation
If you have already installed OpenClaw but the
openclaw command itself is not recognized:- Restart your terminal: Windows often needs a fresh session to recognize new PATH variables.
- Check PATH: Verify that your npm global directory is in your system PATH. You can find this directory by running
npm config get prefix. - Node Version: Ensure you are using Node.js v22 (not higher) for the best compatibility with OpenClaw on Windows.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.