Find your error
Match the error message or symptom you’re seeing to a fix:
If your issue isn’t listed, work through the diagnostic checks below to narrow down the cause.
Run diagnostic checks
Check network connectivity
The installer downloads fromdownloads.claude.ai. Verify you can reach it:
- macOS/Linux
- Windows PowerShell
200 status. You see HTTP/2 200 on macOS and Linux, and HTTP/1.1 200 OK from the curl.exe included with Windows. Other results point to the cause:
403: usually a proxy or network filter blocking the host, or Claude Code is not available in your region5xx: usually a temporary service issue; wait a few minutes and retry
Could not resolve host, or a connection timeout, your network is blocking the connection. Common causes:
- Corporate firewalls or proxies blocking
downloads.claude.ai - Regional network restrictions: try a VPN or alternative network
- TLS/SSL issues: update your system’s CA certificates, or check if
HTTPS_PROXYis configured
HTTPS_PROXY and HTTP_PROXY to your proxy’s address before installing. Ask your IT team for the proxy URL if you don’t know it, or check your browser’s proxy settings.
This example sets both proxy variables, then runs the installer through your proxy:
- macOS/Linux
- Windows PowerShell
Verify your PATH
If installation succeeded but you get acommand not found or not recognized error when running claude, the install directory isn’t in your PATH. Your shell searches for programs in directories listed in PATH, and the installer places claude at ~/.local/bin/claude on macOS/Linux or %USERPROFILE%\.local\bin\claude.exe on Windows.
The VS Code extension does not place
claude at this location. It bundles a private copy of the CLI inside the extension directory for its own chat panel and does not add it to PATH. If you have only installed the extension, ~/.local/bin/claude will not exist. Run the standalone install to use claude from a terminal, then continue below.local/bin:
- macOS/Linux
- Windows PowerShell
- Windows CMD
/Users/you/.local/bin or /home/you/.local/bin, the directory is in your PATH and you can skip to Check for conflicting installations. If there’s no output, add it to your shell configuration.For Zsh, the default on macOS:~/.bash_profile instead. Terminal on macOS starts Bash as a login shell, which ignores ~/.bashrc and reads only the first of ~/.bash_profile, ~/.bash_login, or ~/.profile that exists. If you already have a ~/.bash_login or ~/.profile and no ~/.bash_profile, put the line in that file rather than creating ~/.bash_profile:~/.local/bin to your PATH using your shell’s own configuration syntax, then restart your terminal.Verify the fix worked:Check for conflicting installations
Multiple Claude Code installations can cause version mismatches or unexpected behavior. Check what’s installed:- macOS/Linux
- Windows PowerShell
List all If this prints nothing, no A native install shows a symlink into
claude binaries found in your PATH:claude is on your PATH yet. Go back to Verify your PATH.Check the three locations a claude binary can come from. ~/.local/bin/claude is the native installer, ~/.claude/local/ is a legacy local npm install created by older versions of Claude Code, and the npm global list shows a -g install:~/.local/share/claude/versions/. A script or a symlink you created yourself at this path is a custom launcher, which auto-update leaves in place.If either ls command prints No such file or directory, that’s not an error. It means nothing is installed at that location, so move on to the next check.~/.local/bin/claude on macOS/Linux or %USERPROFILE%\.local\bin\claude.exe on Windows is recommended. Remove the extras:
Uninstall an npm global install:
- macOS/Linux
- Windows PowerShell
claude-code@latest cask, substitute that name:
Check directory permissions
An install that fails on permissions names the path it couldn’t create or write. On Windows the install writes under%USERPROFILE%, which is writable by your user by default, so this section rarely applies there.
On macOS and Linux the install writes to these locations:
~/.claude/downloads/: where the install command puts the downloaded binary~/.local/bin/: theclaudelauncher~/.local/share/claude/: each version it downloads~/.local/state/claude/: its lock files~/.cache/claude/: staged downloads~/.claude.json: your global config file, where the installer records the install method
XDG_DATA_HOME, XDG_STATE_HOME, or XDG_CACHE_HOME, the install uses those in place of ~/.local/share, ~/.local/state, and ~/.cache. If you set CLAUDE_CONFIG_DIR, the global config file lives under that directory instead of your home directory.
Check whether the directories are writable:
Verify the binary works
Ifclaude --version prints a version but claude crashes or hangs on startup, run these checks to narrow down the cause. If claude --version says command not found, go to Verify your PATH first; the commands below assume claude is on your PATH.
Confirm the binary exists and is executable:
- macOS/Linux
- Windows PowerShell
ldd shows missing libraries, you may need to install system packages. On Alpine Linux and other musl-based distributions, see Alpine Linux setup.
Common installation issues
These are the most frequently encountered installation problems and their solutions.Install script returns HTML instead of a shell script
When running the install command, you may see one of these errors:iex trying to run HTML and CSS as PowerShell: