Installing OpenClaw on macOS failed with a
Need sudo accessmessage even though my user was already an Administrator. The fix was to stop piping the installer intobash, download it first, and run it locally so Terminal could prompt for the sudo password.
Introduction
I was setting up OpenClaw on a Mac mini using the install script from the OpenClaw site. The command looked simple enough.
curl -fsSL https://openclaw.ai/install.sh | bash
The installer detected macOS and selected the npm install path, but it failed while trying to install Homebrew. The confusing part was that the error pointed at Administrator access, and the account already had Administrator rights.
The Error
Here was the relevant output from the installer.
macmini:~ youradminuser$ curl -fsSL https://openclaw.ai/install.sh | bash
🦞 OpenClaw Installer
I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.
✓ Detected: macos
Install plan
OS: macos
Install method: npm
Requested version: latest
[1/3] Preparing environment
· Homebrew not found, installing
✗ Installing Homebrew failed — re-run with --verbose for details
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access (which may request your password)...
Need sudo access on macOS (e.g. the user workassistant needs to be an Administrator)!
The last line makes it sound like the account is not an Administrator. That was not the case here.
Why This Was Misleading
The important line was actually this one.
Warning: Running in non-interactive mode because `stdin` is not a TTY.
Piping a remote script straight into bash means the script is running from standard input. In this case, the Homebrew install step needed to check sudo access and may have needed to ask for the password. Since the script was running non-interactively, there was no normal prompt path for entering that password.
So the problem was not really macOS account permissions. The problem was how the installer was being executed.
The Fix
Download the installer first, mark it executable, then run it locally.
curl -fsSL https://openclaw.ai/install.sh -o install.sh
chmod +x install.sh
./install.sh
Running the script as a local executable gave Terminal a normal interactive path for the sudo password prompt. After entering the password, the installer could continue through the Homebrew step.
If Homebrew still fails after that, the installer’s --verbose suggestion is still worth trying for more detail.
Things to Check
- Confirm the macOS account is an Administrator.
- Run the script from Terminal, not from an automation context that cannot prompt.
- If Homebrew is already installed, verify it with
brew --version. - Re-run the local script and enter the password when prompted.
- Optionally remove the downloaded installer with
rm install.shafter setup.
Summary
This was a quick OpenClaw setup gotcha. The account already had the right permissions, but the curl | bash install flow prevented the Homebrew step from prompting for the sudo password.
Downloading the script first and running it locally made the installer interactive enough to complete.
