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:

  1. Use an alternative installation method:

    • macOS/Linux: Use Homebrew
      brew install --cask claude-code
      
    • Windows: Use WinGet
      winget install Anthropic.ClaudeCode
      
  2. 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.

  3. 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:

  1. Check network stability:

    curl -fsSL https://storage.googleapis.com -o /dev/null
    

    If the command completes successfully, your connection is fine; just retry the install command.

  2. 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:

  1. Update your system CA certificates:

    • Ubuntu/Debian:
      sudo apt-get update && sudo apt-get install ca-certificates
      
    • macOS (via Homebrew):
      brew install ca-certificates
      
  2. Enable TLS 1.2 in Windows PowerShell:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    irm https://claude.ai/install.ps1 | iex
    
  3. Check for proxy or firewall interference; configure the NODE_EXTRA_CA_CERTS environment 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:

  1. Test direct connectivity:

    curl -sI https://storage.googleapis.com
    
  2. If behind a proxy, set the HTTPS_PROXY environment 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:

  1. Check if your account has Claude Code access (Pro, Max, Teams, Enterprise, or Console)
  2. Clear cached credentials and log in again:
    rm -rf ~/.claude
    claude
    
  3. 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_PROXY is 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:

  1. In Claude Code, type /help or ask "how do I..."
  2. Browse the full documentation
  3. Join our Discord for community support