Installation Failed?
Encountering issues during installation? Here's a systematic troubleshooting guide.
Issue 1: command not found / 'opencode' is not recognized
Symptoms:
zsh: command not found: opencode
# Or on Windows
'opencode' is not recognized as an internal or external commandTroubleshooting Steps:
1. Confirm You Restarted the Terminal
Did you really close and reopen the window? Not just open a new tab—close the entire window.
2. Check Where OpenCode Was Installed
macOS/Linux (official script installation):
ls -la ~/.opencode/bin/opencodeIf the file exists, the installation succeeded—it's just a PATH issue.
Check if PATH includes the installation directory:
echo $PATH | tr ':' '\n' | grep opencodeIf there's no output, the PATH isn't configured correctly.
3. Manually Add to PATH
macOS/Linux (zsh):
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcmacOS/Linux (bash):
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcWindows (Scoop installation):
Scoop automatically configures PATH. If it's not working, restart PowerShell.
Issue 2: Network Error / Download Timeout
Symptoms:
curl: (7) Failed to connect to opencode.ai port 443
# Or
Error: connect ETIMEDOUTTroubleshooting Steps:
1. Confirm Network Is Working
curl -I https://www.google.comIf Google is also unreachable, it's a network issue, not an OpenCode issue.
2. Check If You Need a Proxy
If you're on a corporate/school network, you may need to configure a proxy. See 1.3 Network Configuration.
3. Try Alternative Installation Methods
The official script downloads from GitHub. If GitHub access is slow, try:
npm installation (npm has mirrors available):
bashnpm install -g opencode-aiHomebrew installation (brew has mirrors available):
bashbrew install anomalyco/tap/opencode
For more installation methods, see 1.2a Alternative Installation Methods.
Issue 3: GitHub API Rate Limiting
Symptoms:
error: rate limit exceededCause:
GitHub API has rate limits for anonymous requests (60 requests/hour).
Solutions:
- Wait an hour and retry
- Or use alternative installation methods (npm, Homebrew, etc.)
Issue 4: Installation Script Reports Missing Tools
Symptoms:
Error: 'tar' is required but not installed.
# Or
Error: 'unzip' is required but not installed.Solution:
Install the missing tools:
# macOS (usually pre-installed)
# If not, install Xcode Command Line Tools:
xcode-select --install
# Ubuntu/Debian
sudo apt install -y tar unzip
# CentOS/RHEL
sudo yum install -y tar unzipIssue 5: Windows Execution Policy Restriction
Symptoms (when installing Scoop):
Running scripts is disabled on this systemSolution:
Run the following command (only needed once):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserIf corporate policy doesn't allow changing the execution policy, you can use Chocolatey (requires admin rights) or download the binary directly.
Issue 6: Finding the Binary Location
# macOS/Linux
which opencode
# Windows PowerShell
Get-Command opencode | Select-Object SourceIssue 7: macOS Desktop App Won't Launch
Symptoms:
Double-clicking OpenCode.app shows no response, or a dialog appears saying "cannot be opened because it cannot verify the developer."
Cause:
This typically happens when:
- The installation package was downloaded from unofficial sources (e.g., third-party websites)
- A self-compiled development version
- Incomplete download due to network issues
Official desktop releases are signed and notarized by Apple and normally won't trigger this issue. If you downloaded from official sources but still encounter blocking, use this command to resolve:
xattr -cr /Applications/OpenCode.appThen double-click to open again.
Note
This command clears the app's quarantine flag, telling macOS you trust this application. You only need to run it once.
Issue 8: Clean Uninstall and Reinstall
OpenCode provides an uninstall command:
opencode uninstallIt will prompt you about what to delete (configuration, data, cache, etc.).
If the opencode command doesn't work at all, you can manually delete:
macOS/Linux (official script installation):
# Delete binary
rm -rf ~/.opencode/bin
# Delete configuration
rm -rf ~/.config/opencode
# Delete data, cache, and state
rm -rf ~/.local/share/opencode
rm -rf ~/.cache/opencode
rm -rf ~/.local/state/opencodeHomebrew installation:
brew uninstall opencodenpm/pnpm/Yarn installation:
# npm
npm uninstall -g opencode-ai
# pnpm
pnpm uninstall -g opencode-ai
# Yarn
yarn global remove opencode-aiScoop installation:
scoop uninstall opencodeChocolatey installation:
choco uninstall opencodeStill Can't Figure It Out?
- Check the Official Troubleshooting Documentation
- Search or ask questions on GitHub Issues
Next Steps
After resolving the issue, go back to 1.2 Installation to verify the installation succeeded.
Still Stuck?
Join the community and connect with 2000+ fellow learners for real-time Q&A.

