Troubleshoot installation and login changedtroubleshoot-install
Nearest release: v2.1.333, published an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 30 Nov 2026 17:53 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 30 Nov 2026 18:07 UTC.
Upstream edited
Recorded here
Lines+19added
Lines−13removed
From line
353
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits40to this page, all time
The whole hunk
from line 353, old and new numbered
/
from line 353
353353
354354If you set `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`](https://code.claude.com/docs/en/env-vars), the global config file lives under that directory instead of your home directory.
355355
356Check whether the directories are writable:
356In Bash or Zsh, create missing directories and check whether each one is writable:
357357
358358```bash theme={null}
359test -w ~/.local/bin && echo "writable" || echo "not writable"
360test -w ~/.claude && echo "writable" || echo "not writable"
359for dir in ~/.claude/downloads ~/.local/bin ~/.local/share/claude ~/.local/state/claude ~/.cache/claude; do
360 mkdir -p "$dir" && test -w "$dir" && echo "writable: $dir" || echo "not writable: $dir"
361done
361362```
362363
363If either directory isn't writable, create the install directory and set your user as the owner:
364If a directory isn't writable, or the install error names a path inside one, take ownership of all these directories.
364365
366The first `chown` is for `~/.local/bin` and the parent directories, and the second is for the install directories and their contents:
367
365368```bash theme={null}
366sudo mkdir -p ~/.local/bin
367sudo chown -R $(whoami) ~/.local
369sudo mkdir -p ~/.claude/downloads ~/.local/bin ~/.local/share/claude ~/.local/state/claude ~/.cache/claude
370sudo chown -h $(whoami) ~/.claude ~/.local ~/.local/bin ~/.local/share ~/.local/state ~/.cache
371sudo chown -R $(whoami) ~/.claude/downloads ~/.local/share/claude ~/.local/state/claude ~/.cache/claude
368372```
373
374Then run the [install command](https://code.claude.com/docs/en/setup.md#install-claude-code) again.
369375
370376### Verify the binary works
371377
No line in this hunk matches that.