Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Troubleshoot installation and login changedtroubleshoot-install

Upstream edited this page at 10 Oct 2026 18:05 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 20 Oct 2026 18:37 UTC.

Upstream edited
Recorded here
Lines+316added
Lines−348removed
From line 59 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits22to this page, all time

### `Cask 'claude-code@latest' is not installed` ### `running scripts is disabled on this system` ### `claude.exe` missing after an update on Windows ### npm `ENOTEMPTY` error during update or reinstall

The whole hunk

from line 59, old and new numbered
/
lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 59
5959 
6060If your issue isn't listed, work through the diagnostic checks below to narrow down the cause.
6161 
62<Tip>
63 If you'd rather skip the terminal entirely, the [Claude Code Desktop app](/docs/en/desktop-quickstart) lets you install and use Claude Code through a graphical interface. Download it for [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) or [Windows](https://claude.com/download?utm_source=claude_code\&utm_medium=docs) and start coding without any command-line setup. On Linux, install the app with apt by following the [Linux install instructions](/docs/en/desktop-linux).
64</Tip>
62> [!TIP]
63>
64> If you'd rather skip the terminal entirely, the [Claude Code Desktop app](/docs/en/desktop-quickstart) lets you install and use Claude Code through a graphical interface. Download it for [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) or [Windows](https://claude.com/download?utm_source=claude_code\&utm_medium=docs) and start coding without any command-line setup. On Linux, install the app with apt by following the [Linux install instructions](/docs/en/desktop-linux).
6565 
6666## Run diagnostic checks
6767 
from line 69
6969 
7070The installer downloads from `downloads.claude.ai`. Verify you can reach it:
7171 
72<Tabs>
73 <Tab title="macOS/Linux">
74 ```bash theme={null}
75 curl -sI https://downloads.claude.ai/claude-code-releases/latest
76 ```
77 </Tab>
78 
79 <Tab title="Windows PowerShell">
80 ```powershell theme={null}
81 curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest
82 ```
83 
84 PowerShell aliases `curl` to `Invoke-WebRequest`, which rejects the `-sI` flags, so call `curl.exe` explicitly.
85 </Tab>
86</Tabs>
72**macOS/Linux**
73 
74```bash theme={null}
75curl -sI https://downloads.claude.ai/claude-code-releases/latest
76```
77 
78**Windows PowerShell**
79 
80```powershell theme={null}
81curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest
82```
83 
84PowerShell aliases `curl` to `Invoke-WebRequest`, which rejects the `-sI` flags, so call `curl.exe` explicitly.
8785 
8886You reached the server if the first line shows a `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:
8987 
from line 98
10098 
10199This example sets both proxy variables, then runs the installer through your proxy:
102100 
103<Tabs>
104 <Tab title="macOS/Linux">
105 ```bash theme={null}
106 export HTTP_PROXY=http://proxy.example.com:8080
107 export HTTPS_PROXY=http://proxy.example.com:8080
108 curl -fsSL https://claude.ai/install.sh | bash
109 ```
110 </Tab>
111 
112 <Tab title="Windows PowerShell">
113 ```powershell theme={null}
114 $env:HTTP_PROXY = 'http://proxy.example.com:8080'
115 $env:HTTPS_PROXY = 'http://proxy.example.com:8080'
116 irm https://claude.ai/install.ps1 | iex
117 ```
118 </Tab>
119</Tabs>
101**macOS/Linux**
102 
103```bash theme={null}
104export HTTP_PROXY=http://proxy.example.com:8080
105export HTTPS_PROXY=http://proxy.example.com:8080
106curl -fsSL https://claude.ai/install.sh | bash
107```
108 
109**Windows PowerShell**
110 
111```powershell theme={null}
112$env:HTTP_PROXY = 'http://proxy.example.com:8080'
113$env:HTTPS_PROXY = 'http://proxy.example.com:8080'
114irm https://claude.ai/install.ps1 | iex
115```
120116 
121117### Verify your PATH
122118 
from line 120
124120 
125121The installer detects this case and reports it under `Setup notes:` in its output: `Native installation exists but ~/.local/bin is not in your PATH.` on macOS and Linux, or `Native installation exists but C:\Users\you\.local\bin is not in your PATH.` on Windows. It prints the fix with that note but doesn't change PATH itself.
126122 
127<Note>
128 The [VS Code extension](/docs/en/vs-code) 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](/docs/en/setup) to use `claude` from a terminal, then continue below.
129</Note>
123> [!NOTE]
124>
125> The [VS Code extension](/docs/en/vs-code) 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](/docs/en/setup) to use `claude` from a terminal, then continue below.
130126 
131127First check that the program is there at all, then check whether its folder is in your PATH. The PATH fix is permanent, so you apply it once. Pick your platform's tab and run its commands there: in your terminal on macOS and Linux, or in PowerShell or Command Prompt on Windows.
132128 
133<Tabs>
134 <Tab title="macOS/Linux">
135 Check that the installer put the program in place:
136 
137 ```bash theme={null}
138 ls -la ~/.local/bin/claude
139 ```
140 
141 * **`No such file or directory`**: there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
142 * **A listing for the file**: the program is there. Check your PATH next.
143 
144 List your PATH entries and filter for the install folder:
145 
146 ```bash theme={null}
147 echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
148 ```
149 
150 If this prints `/Users/you/.local/bin` or `/home/you/.local/bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add it to your shell configuration with the two commands for your shell. The `echo` command saves the setting for every new terminal, and `source` applies it to the window you're in. The `echo` command prints nothing when it succeeds.
151 
152 For Zsh, the default on macOS:
153 
154 ```bash theme={null}
155 echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
156 source ~/.zshrc
157 ```
158 
159 For Bash on Linux, where it's the default on most distributions:
160 
161 ```bash theme={null}
162 echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
163 source ~/.bashrc
164 ```
165 
166 For Bash on macOS, add the line to `~/.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`:
167 
168 ```bash theme={null}
169 echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
170 source ~/.bash_profile
171 ```
172 
173 Alternatively, close and reopen your terminal.
174 
175 If the `echo` command prints `permission denied`, see [`permission denied` when adding to your PATH](#permission-denied-when-adding-to-your-path).
176 
177 For other shells such as fish or Nushell, add `~/.local/bin` to your PATH using your shell's own configuration syntax, then restart your terminal.
178 
179 Verify the fix worked:
180 
181 ```bash theme={null}
182 claude --version
183 ```
184 
185 If `claude` is still not found, check these causes:
186 
187 * **The terminal predates the change**: a window that was already open keeps its old PATH, and a terminal inside an editor takes its PATH from the editor. Open a new window, or quit and reopen the editor.
188 * **The line wasn't saved**: run `grep -n '.local/bin' ~/.zshrc`, using your shell's file name. It prints the line with its line number when the line is there. If it prints nothing, run the two PATH commands again.
189 * **The line went to another shell's file**: run `echo $0` to see your shell, then run the two PATH commands for that shell.
190 </Tab>
191 
192 <Tab title="Windows PowerShell">
193 Check that the installer put the program in place:
194 
195 ```powershell theme={null}
196 Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
197 ```
198 
199 * **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
200 * **`True`**: the program is there. Check your PATH next.
201 
202 List your PATH entries and filter for the install folder:
203 
204 ```powershell theme={null}
205 $env:PATH -split ';' | Select-String '\.local\\bin'
206 ```
207 
208 If this prints `C:\Users\you\.local\bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add the install directory to your User PATH:
209 
210 ```powershell theme={null}
211 $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
212 [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
213 ```
214 
215 Restart your terminal for the change to take effect.
216 
217 Verify the fix worked:
218 
219 ```powershell theme={null}
220 claude --version
221 ```
222 
223 If `claude` is still not found in a new terminal, check these causes:
224 
225 * **The terminal runs inside an editor**: it takes its PATH from the editor, so quit and reopen the editor.
226 * **The change wasn't saved**: run `[Environment]::GetEnvironmentVariable('PATH', 'User')` and look for `.local\bin` in the PATH it prints. If it's missing, run the two commands again.
227 </Tab>
228 
229 <Tab title="Windows CMD">
230 Check that the installer put the program in place:
231 
232 ```batch theme={null}
233 dir "%USERPROFILE%\.local\bin\claude.exe"
234 ```
235 
236 * **`File Not Found` or `The system cannot find the path specified.`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
237 * **A listing for `claude.exe`**: the program is there. Check your PATH next.
238 
239 List your PATH entries and filter for the install folder:
240 
241 ```batch theme={null}
242 echo %PATH% | findstr /i "local\bin"
243 ```
244 
245 If there's no output, open System Settings, go to Environment Variables, and add `%USERPROFILE%\.local\bin` to your User PATH variable. Restart your terminal.
246 
247 Verify the fix worked:
248 
249 ```batch theme={null}
250 claude --version
251 ```
252 
253 If `claude` is still not found in a new terminal, a terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.
254 </Tab>
255</Tabs>
129**macOS/Linux**
130 
131Check that the installer put the program in place:
132 
133```bash theme={null}
134ls -la ~/.local/bin/claude
135```
136 
137* **`No such file or directory`**: there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
138* **A listing for the file**: the program is there. Check your PATH next.
139 
140List your PATH entries and filter for the install folder:
141 
142```bash theme={null}
143echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
144```
145 
146If this prints `/Users/you/.local/bin` or `/home/you/.local/bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add it to your shell configuration with the two commands for your shell. The `echo` command saves the setting for every new terminal, and `source` applies it to the window you're in. The `echo` command prints nothing when it succeeds.
147 
148For Zsh, the default on macOS:
149 
150```bash theme={null}
151echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
152source ~/.zshrc
153```
154 
155For Bash on Linux, where it's the default on most distributions:
156 
157```bash theme={null}
158echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
159source ~/.bashrc
160```
161 
162For Bash on macOS, add the line to `~/.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`:
163 
164```bash theme={null}
165echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
166source ~/.bash_profile
167```
168 
169Alternatively, close and reopen your terminal.
170 
171If the `echo` command prints `permission denied`, see [`permission denied` when adding to your PATH](#permission-denied-when-adding-to-your-path).
172 
173For other shells such as fish or Nushell, add `~/.local/bin` to your PATH using your shell's own configuration syntax, then restart your terminal.
174 
175Verify the fix worked:
176 
177```bash theme={null}
178claude --version
179```
180 
181If `claude` is still not found, check these causes:
182 
183* **The terminal predates the change**: a window that was already open keeps its old PATH, and a terminal inside an editor takes its PATH from the editor. Open a new window, or quit and reopen the editor.
184* **The line wasn't saved**: run `grep -n '.local/bin' ~/.zshrc`, using your shell's file name. It prints the line with its line number when the line is there. If it prints nothing, run the two PATH commands again.
185* **The line went to another shell's file**: run `echo $0` to see your shell, then run the two PATH commands for that shell.
186 
187**Windows PowerShell**
188 
189Check that the installer put the program in place:
190 
191```powershell theme={null}
192Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
193```
194 
195* **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
196* **`True`**: the program is there. Check your PATH next.
197 
198List your PATH entries and filter for the install folder:
199 
200```powershell theme={null}
201$env:PATH -split ';' | Select-String '\.local\\bin'
202```
203 
204If this prints `C:\Users\you\.local\bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add the install directory to your User PATH:
205 
206```powershell theme={null}
207$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
208[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
209```
210 
211Restart your terminal for the change to take effect.
212 
213Verify the fix worked:
214 
215```powershell theme={null}
216claude --version
217```
218 
219If `claude` is still not found in a new terminal, check these causes:
220 
221* **The terminal runs inside an editor**: it takes its PATH from the editor, so quit and reopen the editor.
222* **The change wasn't saved**: run `[Environment]::GetEnvironmentVariable('PATH', 'User')` and look for `.local\bin` in the PATH it prints. If it's missing, run the two commands again.
223 
224**Windows CMD**
225 
226Check that the installer put the program in place:
227 
228```batch theme={null}
229dir "%USERPROFILE%\.local\bin\claude.exe"
230```
231 
232* **`File Not Found` or `The system cannot find the path specified.`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
233* **A listing for `claude.exe`**: the program is there. Check your PATH next.
234 
235List your PATH entries and filter for the install folder:
236 
237```batch theme={null}
238echo %PATH% | findstr /i "local\bin"
239```
240 
241If there's no output, open System Settings, go to Environment Variables, and add `%USERPROFILE%\.local\bin` to your User PATH variable. Restart your terminal.
242 
243Verify the fix worked:
244 
245```batch theme={null}
246claude --version
247```
248 
249If `claude` is still not found in a new terminal, a terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.
256250 
257251### Check for conflicting installations
258252 
259253Multiple Claude Code installations can cause version mismatches or unexpected behavior. Check what's installed:
260254 
261<Tabs>
262 <Tab title="macOS/Linux">
263 List all `claude` binaries found in your PATH:
264 
265 ```bash theme={null}
266 which -a claude
267 ```
268 
269 If this prints `claude not found`, a `no claude in` line, or nothing, no `claude` is on your PATH. The next checks show whether one is installed at all.
270 
271 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:
272 
273 ```bash theme={null}
274 ls -la ~/.local/bin/claude
275 ```
276 
277 A native install shows a symlink into `~/.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](/docs/en/setup#auto-updates).
278 
279 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.
280 
281 ```bash theme={null}
282 ls -la ~/.claude/local/
283 ```
284 
285 ```bash theme={null}
286 npm -g ls @anthropic-ai/claude-code 2>/dev/null
287 ```
288 
289 If `ls -la ~/.local/bin/claude` printed `No such file or directory`, there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](/docs/en/setup#install-claude-code). If `~/.local/bin/claude` exists but `which -a claude` didn't list it, the folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
290 </Tab>
291 
292 <Tab title="Windows PowerShell">
293 List all `claude` binaries found in your PATH:
294 
295 ```powershell theme={null}
296 where.exe claude
297 ```
298 
299 If this prints `INFO: Could not find files for the given pattern(s).`, no `claude` is on your PATH.
300 
301 Check whether the native installer placed a binary:
302 
303 ```powershell theme={null}
304 Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
305 ```
306 
307 * **`True`**: the native install is there. If `where.exe` found nothing, its folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
308 * **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code).
309 </Tab>
310</Tabs>
255**macOS/Linux**
256 
257List all `claude` binaries found in your PATH:
258 
259```bash theme={null}
260which -a claude
261```
262 
263If this prints `claude not found`, a `no claude in` line, or nothing, no `claude` is on your PATH. The next checks show whether one is installed at all.
264 
265Check 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:
266 
267```bash theme={null}
268ls -la ~/.local/bin/claude
269```
270 
271A native install shows a symlink into `~/.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](/docs/en/setup#auto-updates).
272 
273If 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.
274 
275```bash theme={null}
276ls -la ~/.claude/local/
277```
278 
279```bash theme={null}
280npm -g ls @anthropic-ai/claude-code 2>/dev/null
281```
282 
283If `ls -la ~/.local/bin/claude` printed `No such file or directory`, there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](/docs/en/setup#install-claude-code). If `~/.local/bin/claude` exists but `which -a claude` didn't list it, the folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
284 
285**Windows PowerShell**
286 
287List all `claude` binaries found in your PATH:
288 
289```powershell theme={null}
290where.exe claude
291```
292 
293If this prints `INFO: Could not find files for the given pattern(s).`, no `claude` is on your PATH.
294 
295Check whether the native installer placed a binary:
296 
297```powershell theme={null}
298Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
299```
300 
301* **`True`**: the native install is there. If `where.exe` found nothing, its folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
302* **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](/docs/en/setup#install-claude-code).
311303 
312304If you find multiple installations, keep only one. The native install at `~/.local/bin/claude` on macOS/Linux or `%USERPROFILE%\.local\bin\claude.exe` on Windows is recommended. Remove the extras:
313305 
from line 311
319311 
320312Remove the legacy local npm install:
321313 
322<Tabs>
323 <Tab title="macOS/Linux">
324 ```bash theme={null}
325 rm -rf ~/.claude/local
326 ```
327 </Tab>
328 
329 <Tab title="Windows PowerShell">
330 ```powershell theme={null}
331 Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
332 ```
333 </Tab>
334</Tabs>
314**macOS/Linux**
315 
316```bash theme={null}
317rm -rf ~/.claude/local
318```
319 
320**Windows PowerShell**
321 
322```powershell theme={null}
323Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
324```
335325 
336326Remove a Homebrew install on macOS. If you installed the `claude-code@latest` cask, substitute that name:
337327 
from line 370
380370 
381371Confirm the binary exists and is executable:
382372 
383<Tabs>
384 <Tab title="macOS/Linux">
385 ```bash theme={null}
386 ls -la "$(command -v claude)"
387 ```
388 </Tab>
389 
390 <Tab title="Windows PowerShell">
391 ```powershell theme={null}
392 Get-Command claude | Select-Object Source
393 ```
394 </Tab>
395</Tabs>
373**macOS/Linux**
374 
375```bash theme={null}
376ls -la "$(command -v claude)"
377```
378 
379**Windows PowerShell**
380 
381```powershell theme={null}
382Get-Command claude | Select-Object Source
383```
396384 
397385On Linux, check for missing shared libraries. If `ldd` shows missing libraries, you may need to install system packages. On Alpine Linux and other musl-based distributions, see [Alpine Linux setup](/docs/en/setup#alpine-linux-and-musl-based-distributions).
398386 
from line 518
530518 
531519If Homebrew installs an older Claude Code version than you expect, the same stale index is usually the cause. The `claude-code` cask tracks the stable channel and is typically about one week behind the latest release; for the newest version run `brew install --cask claude-code@latest` instead. See [Configure release channel](/docs/en/setup#configure-release-channel) for the difference between the two casks.
532520 
533<h3 id="cask-is-not-installed">
534 `Cask 'claude-code@latest' is not installed`
535</h3>
521### `Cask 'claude-code@latest' is not installed`
536522 
537523Homebrew offers two casks, `claude-code` and `claude-code@latest`. Running `brew upgrade --cask claude-code@latest` when that cask isn't the one installed prints `Error: Cask 'claude-code@latest' is not installed.` To see which cask you have, run this in your terminal:
538524 
from line 562
576562 
5775633. **Check for proxy or firewall interference**: corporate proxies that perform TLS inspection can cause these errors, including `unable to get local issuer certificate` and `SELF_SIGNED_CERT_IN_CHAIN`. For the install step, make the install download trust your corporate proxy's CA:
578564 
579 <Tabs>
580 <Tab title="macOS/Linux">
581 ```bash theme={null}
582 curl --cacert /path/to/corporate-ca.pem -fsSL https://claude.ai/install.sh | bash
583 ```
584 </Tab>
585 
586 <Tab title="Windows PowerShell">
587 The PowerShell installer downloads through .NET, which validates TLS against the Windows certificate store. Ask your IT team to add the proxy's CA certificate to the Windows store if it isn't already there, then run the installer:
588 
589 ```powershell theme={null}
590 irm https://claude.ai/install.ps1 | iex
591 ```
592 </Tab>
593 </Tabs>
565 **macOS/Linux**
566 
567 ```bash theme={null}
568 curl --cacert /path/to/corporate-ca.pem -fsSL https://claude.ai/install.sh | bash
569 ```
570 
571 **Windows PowerShell**
572 
573 The PowerShell installer downloads through .NET, which validates TLS against the Windows certificate store. Ask your IT team to add the proxy's CA certificate to the Windows store if it isn't already there, then run the installer:
574 
575 ```powershell theme={null}
576 irm https://claude.ai/install.ps1 | iex
577 ```
594578 
595579 For Claude Code itself once installed, set `NODE_EXTRA_CA_CERTS` so API requests trust the same bundle:
596580 
597 <Tabs>
598 <Tab title="macOS/Linux">
599 ```bash theme={null}
600 export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
601 ```
602 </Tab>
603 
604 <Tab title="Windows PowerShell">
605 ```powershell theme={null}
606 $env:NODE_EXTRA_CA_CERTS = 'C:\path\to\corporate-ca.pem'
607 ```
608 </Tab>
609 </Tabs>
581 **macOS/Linux**
582 
583 ```bash theme={null}
584 export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
585 ```
586 
587 **Windows PowerShell**
588 
589 ```powershell theme={null}
590 $env:NODE_EXTRA_CA_CERTS = 'C:\path\to\corporate-ca.pem'
591 ```
610592 
611593 Ask your IT team for the certificate file if you don't have it. You can also try on a direct connection to confirm the proxy is the cause.
612594 
from line 674
692674 
693675Whichever installer you use, confirm it worked: open a new terminal and run `claude --version`, which prints a version number such as `2.1.211 (Claude Code)`.
694676 
695<h3 id="running-scripts-is-disabled-on-this-system">
696 `running scripts is disabled on this system`
697</h3>
677### `running scripts is disabled on this system`
698678 
699679Installing or running Claude Code through npm on Windows can fail with a `SecurityError`:
700680 
from line 706
726706irm https://claude.ai/install.ps1 | iex
727707```
728708 
729<h3 id="claude-exe-missing-after-an-update-on-windows">
730 `claude.exe` missing after an update on Windows
731</h3>
709### `claude.exe` missing after an update on Windows
732710 
733711If your terminal reports `'claude' is not recognized` right after Claude Code updated on Windows, check whether `%USERPROFILE%\.local\bin` still contains `claude.exe`. If that directory isn't on your PATH at all, see [Verify your PATH](#verify-your-path) instead. To update on Windows, Claude Code renames the existing `claude.exe` aside to a backup and moves the new version into its place. If moving the new version into place fails and Claude Code can't rename the backup back either, the directory keeps the backup but has no `claude.exe`.
734712 
from line 800
822800 
823801In every other configuration, rerunning the installer gets past this error, because the script runs the latest release's `install` command even when you ask it to install an older version. Rerun the command for your platform:
824802 
825<Tabs>
826 <Tab title="macOS/Linux">
827 ```bash theme={null}
828 curl -fsSL https://claude.ai/install.sh | bash
829 ```
830 </Tab>
831 
832 <Tab title="Windows PowerShell">
833 ```powershell theme={null}
834 irm https://claude.ai/install.ps1 | iex
835 ```
836 </Tab>
837</Tabs>
803**macOS/Linux**
804 
805```bash theme={null}
806curl -fsSL https://claude.ai/install.sh | bash
807```
808 
809**Windows PowerShell**
810 
811```powershell theme={null}
812irm https://claude.ai/install.ps1 | iex
813```
838814 
839815`claude --version` prints the version the rerun installed.
840816 
from line 994
1018994export PATH="$HOME/.nvm/versions/node/$(node -v)/bin:$PATH"
1019995```
1020996 
1021<Warning>
1022 Avoid disabling Windows PATH importing via `appendWindowsPath = false` as this breaks the ability to call Windows executables from WSL. Similarly, avoid uninstalling Node.js from Windows if you use it for Windows development.
1023</Warning>
997> [!WARNING]
998>
999> Avoid disabling Windows PATH importing via `appendWindowsPath = false` as this breaks the ability to call Windows executables from WSL. Similarly, avoid uninstalling Node.js from Windows if you use it for Windows development.
10241000 
10251001### Permission errors during installation
10261002 
from line 1034
10581034* **Unsupported platform.** Prebuilt binaries are published for `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`, `win32-x64`, and `win32-arm64`. Claude Code does not ship a binary for other platforms; see the [system requirements](/docs/en/setup#system-requirements). On FreeBSD, the installer reports the platform as unsupported. Before v2.1.205, it treated FreeBSD as Linux and downloaded a binary that couldn't run.
10591035* **Corporate npm mirror is missing the platform packages.** Ensure your registry mirrors all eight `@anthropic-ai/claude-code-*` platform packages in addition to the meta package.
10601036 
1061<h3 id="npm-enotempty-during-update-or-reinstall">
1062 npm `ENOTEMPTY` error during update or reinstall
1063</h3>
1037### npm `ENOTEMPTY` error during update or reinstall
10641038 
10651039When you run `npm install -g @anthropic-ai/claude-code` over an existing installation, npm can fail while moving the old package directory aside:
10661040 
from line 1049
10751049 
10761050The `npm error path` line names the directory npm couldn't move. Delete that directory and any leftover `.claude-code-*` directories next to it, which earlier interrupted runs can leave behind. The commands below find your global package directory with `npm root -g`; if the directory the `npm error path` line names is not under the directory `npm root -g` prints, for example because you switched Node versions with nvm, delete the directories the error names instead:
10771051 
1078<Tabs>
1079 <Tab title="macOS/Linux">
1080 ```bash theme={null}
1081 rm -rf "$(npm root -g)/@anthropic-ai/claude-code"
1082 ```
1083 
1084 Then remove any leftover temp directories. If Zsh prints `no matches found`, there were none to remove:
1085 
1086 ```bash theme={null}
1087 rm -rf "$(npm root -g)/@anthropic-ai/.claude-code-"*
1088 ```
1089 </Tab>
1090 
1091 <Tab title="Windows PowerShell">
1092 ```powershell theme={null}
1093 Remove-Item -Recurse -Force "$(npm root -g)/@anthropic-ai/claude-code", "$(npm root -g)/@anthropic-ai/.claude-code-*"
1094 ```
1095 </Tab>
1096</Tabs>
1052**macOS/Linux**
1053 
1054```bash theme={null}
1055rm -rf "$(npm root -g)/@anthropic-ai/claude-code"
1056```
1057 
1058Then remove any leftover temp directories. If Zsh prints `no matches found`, there were none to remove:
1059 
1060```bash theme={null}
1061rm -rf "$(npm root -g)/@anthropic-ai/.claude-code-"*
1062```
1063 
1064**Windows PowerShell**
1065 
1066```powershell theme={null}
1067Remove-Item -Recurse -Force "$(npm root -g)/@anthropic-ai/claude-code", "$(npm root -g)/@anthropic-ai/.claude-code-*"
1068```
10971069 
10981070Then reinstall:
10991071 
from line 1124
11521124 
11531125To use your subscription instead, unset the environment variable and remove it from your shell profile:
11541126 
1155<Tabs>
1156 <Tab title="macOS/Linux">
1157 ```bash theme={null}
1158 unset ANTHROPIC_API_KEY
1159 claude
1160 ```
1161 </Tab>
1162 
1163 <Tab title="Windows PowerShell">
1164 ```powershell theme={null}
1165 Remove-Item Env:ANTHROPIC_API_KEY
1166 claude
1167 ```
1168 </Tab>
1169</Tabs>
1127**macOS/Linux**
1128 
1129```bash theme={null}
1130unset ANTHROPIC_API_KEY
1131claude
1132```
1133 
1134**Windows PowerShell**
1135 
1136```powershell theme={null}
1137Remove-Item Env:ANTHROPIC_API_KEY
1138claude
1139```
11701140 
11711141Check `~/.zshrc`, `~/.bashrc`, or `~/.profile` for `export ANTHROPIC_API_KEY=...` lines and remove them to make the change permanent. On Windows, check your PowerShell profile at `$PROFILE` and your User environment variables for `ANTHROPIC_API_KEY`. Run `/status` inside Claude Code to confirm which authentication method is active.
11721142 
from line 1175
12051175 
12061176To make the Keychain writable again and move your login back into the encrypted Keychain:
12071177 
1208<Steps>
1209 <Step title="Check Keychain access">
1210 Run `claude doctor` to check Keychain access. When the Keychain rejects writes, the report lists a warning that starts with `macOS Keychain is not writable`, followed by a suggested fix. When the report lists no Keychain warning, the Keychain is writable and you can skip to the last step.
1211 </Step>
1212 
1213 <Step title="Unlock the Keychain">
1214 ```bash theme={null}
1215 security unlock-keychain ~/Library/Keychains/login.keychain-db
1216 ```
1217 
1218 Enter your Keychain password when the command asks for it, then run `claude doctor` again. When the unlock worked, the report no longer lists the Keychain warning.
1219 </Step>
1220 
1221 <Step title="Resync the Keychain password if unlocking doesn't help">
1222 Open Keychain Access, select the `login` keychain, and choose **Edit > Change Password for Keychain "login"** to resync it with your account password. Then run `claude doctor` again. Go on to the next step once the report no longer lists the Keychain warning.
1223 </Step>
1224 
1225 <Step title="Log out and back in">
1226 Once the Keychain is writable again, Claude Code moves the credentials back the next time it writes a credential. To force it now, run `/logout` and then `/login`. Logging out removes all stored credentials, including the plaintext file's contents, saved MCP server logins, and plugin sensitive values, so expect to re-authorize MCP servers and re-enter plugin secrets afterwards. Logging in again stores your login in the Keychain.
1227 </Step>
1228</Steps>
1178**1. Check Keychain access**
1179 
1180Run `claude doctor` to check Keychain access. When the Keychain rejects writes, the report lists a warning that starts with `macOS Keychain is not writable`, followed by a suggested fix. When the report lists no Keychain warning, the Keychain is writable and you can skip to the last step.
1181 
1182**2. Unlock the Keychain**
1183 
1184```bash theme={null}
1185security unlock-keychain ~/Library/Keychains/login.keychain-db
1186```
1187 
1188Enter your Keychain password when the command asks for it, then run `claude doctor` again. When the unlock worked, the report no longer lists the Keychain warning.
1189 
1190**3. Resync the Keychain password if unlocking doesn't help**
1191 
1192Open Keychain Access, select the `login` keychain, and choose **Edit > Change Password for Keychain "login"** to resync it with your account password. Then run `claude doctor` again. Go on to the next step once the report no longer lists the Keychain warning.
1193 
1194**4. Log out and back in**
1195 
1196Once the Keychain is writable again, Claude Code moves the credentials back the next time it writes a credential. To force it now, run `/logout` and then `/login`. Logging out removes all stored credentials, including the plaintext file's contents, saved MCP server logins, and plugin sensitive values, so expect to re-authorize MCP servers and re-enter plugin secrets afterwards. Logging in again stores your login in the Keychain.
12291197 
12301198### Bedrock, Agent Platform, or Foundry credentials not loading
12311199 
12321200 
Feedback