40>40>
41> **macOS、Linux、WSL:**41> **macOS、Linux、WSL:**
42>42>
43> ```bash theme={null}43> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
44> curl -fsSL https://claude.ai/install.sh | bash44> curl -fsSL https://claude.ai/install.sh | bash
45> ```45> ```
46>46>
48>48>
49> **Windows PowerShell:**49> **Windows PowerShell:**
50>50>
51> ```powershell theme={null}51> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
52> irm https://claude.ai/install.ps1 | iex52> irm https://claude.ai/install.ps1 | iex
53> ```53> ```
54>54>
55> **Windows CMD:**55> **Windows CMD:**
56>56>
57> ```batch theme={null}57> ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
59> ```59> ```
60>60>
72 72
73> [tab] Homebrew73> [tab] Homebrew
74>74>
75> ```bash theme={null}75> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
76> brew install --cask claude-code76> brew install --cask claude-code
77> ```77> ```
78>78>
84 84
85> [tab] WinGet85> [tab] WinGet
86>86>
87> ```powershell theme={null}87> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
88> winget install Anthropic.ClaudeCode88> winget install Anthropic.ClaudeCode
89> ```89> ```
90>90>
141 141
142### Alpine Linux と musl ベースのディストリビューション142### Alpine Linux と musl ベースのディストリビューション
143 143
144Alpine およびその他の musl/uClibc ベースのディストリビューション上に Claude Code をインストールするには、インストールコマンド用に `bash` と `curl` が必要であり、実行時に `libgcc`、`libstdc++`、および `ripgrep` が必要です。Alpine はデフォルトで `bash` と `curl` を含まないため、ドキュメント化されたインストールコマンドは `not found` エラーで失敗します。これらをインストールするまで、ディストリビューションのパッケージマネージャーを使用してこれらのパッケージをインストールしてから、`USE_BUILTIN_RIPGREP=0` を設定します。144Alpine およびその他の musl ベースのディストリビューションでは、[インストールコマンド](#install-claude-code)に `bash` と `curl` が必要であり、Claude Code 自体には `bash` または `zsh` が必要です。Alpine にはデフォルトで `bash` も `curl` も含まれていないため、これらをインストールするまで、ドキュメントに記載されたインストールコマンドは `not found` エラーで失敗します。
145 145
146この例は Alpine で必要なパッケージをインストールします。146この例は Alpine で必要なパッケージをインストールします。
147 147
148```bash theme={null}148```bash theme={null}
149apk add bash curl libgcc libstdc++ ripgrep149apk add bash curl
150```
151
152Alpine では、`ripgrep` はコミュニティリポジトリにあります。`apk` がパッケージが見つからないと報告する場合は、Alpine バージョンを使用して `/etc/apk/repositories` にコミュニティリポジトリを追加します。
153
154```bash theme={null}
155echo "https://dl-cdn.alpinelinux.org/alpine/v3.22/community" >> /etc/apk/repositories
156```
157
158`apk update` を実行してパッケージインデックスを更新し、`apk add` コマンドを再試行します。
159
160次に、[`settings.json`](https://code.claude.com/docs/ja/settings-reference#all-settings)ファイルで `USE_BUILTIN_RIPGREP` を `0` に設定します。
161
162```json theme={null}
163{
164 "env": {
165 "USE_BUILTIN_RIPGREP": "0"
166 }
167}
168```150```
169 151
170## インストールを確認152## インストールを確認
443> wget -O /etc/apk/keys/claude-code.rsa.pub \425> wget -O /etc/apk/keys/claude-code.rsa.pub \
444> https://downloads.claude.ai/keys/claude-code.rsa.pub426> https://downloads.claude.ai/keys/claude-code.rsa.pub
445> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories427> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories
446> apk add claude-code428> apk add bash claude-code
447> ```429> ```
448>430>
449> `latest` チャネルに切り替えるには、`stable` リポジトリ行を削除し、`latest` リポジトリを追加します:431> `latest` チャネルに切り替えるには、`stable` リポジトリ行を削除し、`latest` リポジトリを追加します: