Claude Code FAQ
This page lists the most common issues encountered during Claude Code installation and usage, along with solutions.
Installation Issues
Command Not Found
After installation, you encounter command not found: claude or 'claude' is not recognized errors, indicating the installation directory is not in your system PATH.
Solution: Check and configure your PATH environment variable.
Add to .zshrc or .bashrc on macOS/Linux:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Windows PowerShell:
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
Then restart your terminal and verify:
claude --version
Install Script Returns HTML
When running the install command, you see errors like:
bash: line 1: syntax error near unexpected token '<'bash: line 1: '<!DOCTYPE html>'- On PowerShell:
Invoke-Expression: Missing argument in parameter list
This means the install URL returned an HTML page instead of an install script.
Solution:
Use an alternative installation method:
- macOS/Linux: Use Homebrew
brew install --cask claude-code - Windows: Use WinGet
winget install Anthropic.ClaudeCode
- macOS/Linux: Use Homebrew
If the HTML page shows "App unavailable in region", Claude Code is not available in your country/region. See the list of supported countries and regions.
Wait a few minutes and retry—the issue is usually temporary.
curl Download Failed
Error message: curl: (56) Failure writing output to destination
This means the connection broke before the script finished downloading.
Solution:
Check network stability:
curl -fsSL https://storage.googleapis.com -o /dev/nullIf the command completes successfully, your connection is fine; just retry the install command.
Use an alternative installation method (see above).
TLS/SSL Connection Errors
Error messages: curl: (35) TLS connect error, schannel: next InitializeSecurityContext failed, or Could not establish trust relationship for the SSL/TLS secure channel
Solution:
Update your system CA certificates:
- Ubuntu/Debian:
sudo apt-get update && sudo apt-get install ca-certificates - macOS (via Homebrew):
brew install ca-certificates
- Ubuntu/Debian:
Enable TLS 1.2 in Windows PowerShell:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 irm https://claude.ai/install.ps1 | iexCheck for proxy or firewall interference; configure the
NODE_EXTRA_CA_CERTSenvironment variable.
Failed to Fetch Version
Error message: Failed to fetch version from storage.googleapis.com
This means storage.googleapis.com is blocked on your network.
Solution:
Test direct connectivity:
curl -sI https://storage.googleapis.comIf behind a proxy, set the
HTTPS_PROXYenvironment variable.
Windows Requires Git Bash
Error message: Claude Code on Windows requires git-bash
Solution: Install Git for Windows, then rerun the install command.
If Git is already installed but the error persists, configure the Git Bash path in your settings file:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
Illegal Instruction on Linux
Error message: Illegal instruction
This is usually caused by architecture mismatch. Please confirm your CPU architecture is compatible with the installed binary.
Binary Cannot Load on macOS
Error messages: dyld: cannot load or Abort trap
This means the binary is incompatible with your system. Please confirm you downloaded the correct version of Claude Code (Intel or Apple Silicon).
Install Killed on Low-Memory Servers
Error message: Shows Killed during installation on Linux servers
Solution: Add swap space for low-memory servers.
Authentication Issues
OAuth Error or 403 Forbidden
Solution:
- Check if your account has Claude Code access (Pro, Max, Teams, Enterprise, or Console)
- Clear cached credentials and log in again:
rm -rf ~/.claude claude - Check if your region is on the supported list
Region Unavailable
Error message: App unavailable in region
Claude Code is not available in your country/region. See Anthropic supported countries and regions.
Network Configuration
Check Network Connectivity
The installer downloads from storage.googleapis.com. Verify you can reach it:
curl -sI https://storage.googleapis.com
If this fails, possible causes include:
- Corporate firewalls or proxies blocking Google Cloud Storage
- Regional network restrictions: Try a VPN or alternative network
- TLS/SSL issues: Update system CA certificates, or check if
HTTPS_PROXYis configured
Proxy Configuration
If behind a corporate proxy, set proxy environment variables before installing:
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
curl -fsSL https://claude.ai/install.sh | bash
Check for Conflicting Installations
Multiple Claude Code installations can cause version mismatches or unexpected behavior.
Check what's installed:
macOS/Linux:
which -a claude
ls -la ~/.local/bin/claude
npm -g ls @anthropic-ai/claude-code 2>/dev/null
Windows:
where.exe claude
Test-Path "$env:LOCALAPPDATA\Claude Code\claude.exe"
If you find multiple installations, keep only one (native install at ~/.local/bin/claude is recommended).
Remove extra installations:
- npm global install:
npm uninstall -g @anthropic-ai/claude-code - Homebrew install:
brew uninstall --cask claude-code
Check Directory Permissions
The installer needs write access to ~/.local/bin/ and ~/.claude/. Check if these directories are writable:
test -w ~/.local/bin && echo "writable" || echo "not writable"
test -w ~/.claude && echo "writable" || echo "not writable"
If a directory isn't writable:
sudo mkdir -p ~/.local/bin
sudo chown -R $(whoami) ~/.local
Verify Binary
If claude is installed but crashes or hangs on startup:
Confirm the binary exists and is executable:
ls -la $(which claude)
On Linux, check for missing shared libraries:
ldd $(which claude) | grep "not found"
Run basic checks:
claude --version
Diagnostic Tools
Use claude doctor for more detailed installation and configuration information:
claude doctor
Other Issues
If none of the above solutions resolve your problem:
- In Claude Code, type
/helpor ask "how do I..." - Browse the full documentation
- Join our Discord for community support
