071. 설치·로그인 문제 해결 (Troubleshoot installation and login)
- 원문: English
- 위치: Build with Claude Code › Troubleshooting › Troubleshoot installation and login
한 줄 요약
설치·로그인 오류 메시지별 해결책 모음입니다. 대부분은 PATH, 네트워크/프록시/사내 CA, 설치 방식 중복, 인증 정보 충돌(ANTHROPIC_API_KEY) 중 하나가 원인입니다.
쉽게 말하면
설치 후 동작 중 문제는 072 Troubleshooting, 설정이 안 먹히는 문제는 073 Debug your configuration, API 오류(500/529/429 등)는 074 Error reference를 보세요. 이 페이지는 “설치가 안 된다 / 로그인이 안 된다"에 집중합니다.
💡 터미널이 부담스러우면 Desktop 앱으로 GUI 설치도 가능합니다.
핵심 내용
오류 메시지 → 원인 빠른 표
| 보이는 메시지 | 원인 / 해결 |
|---|---|
command not found: claude, 'claude' is not recognized | 설치 디렉터리가 PATH에 없음 → 아래 PATH 설정 |
syntax error near unexpected token '<', < was unexpected at this time, System.Xml.XmlDocument, iex 파싱 오류 | 설치 URL이 스크립트 대신 HTML/XML을 반환. 지역 미지원(App unavailable in region), 프록시, 일시 장애 |
curl: (22) ... 403 | 지역 미지원 또는 사내 프록시/방화벽 차단 |
curl: (23)/(56) Failure writing output | 스크립트를 끝까지 못 받음 → 연결 확인 후 재시도 |
Killed, Installation was killed ... (exit code 137) | Linux OOM. 설치에 약 512MB 여유 메모리 필요 → 스왑 추가 |
TLS connect error, unable to get local issuer certificate, SELF_SIGNED_CERT_IN_CHAIN | CA 인증서 / TLS 검사 프록시 |
CRYPT_E_NO_REVOCATION_CHECK, CRYPT_E_REVOCATION_OFFLINE | Windows 인증서 폐기 확인이 막힘 |
The connection dropped while downloading the update, Download timed out | 프록시가 큰 다운로드를 끊음 / 느린 네트워크 |
Release verification failed | 릴리스 진위 확인 실패 → 아무것도 설치 안 됨 |
Auto-update failed · Run claude doctor | 백그라운드 업데이트 실패 → 셸에서 claude update |
irm is not recognized, '&&' is not a valid statement separator, 'fsSL', 'bash' is not recognized | 다른 셸/OS용 설치 명령을 붙여넣음 |
running scripts is disabled on this system | PowerShell 실행 정책이 npm .ps1 런처 차단 |
Error loading shared library | musl/glibc 바이너리 불일치 |
Illegal instruction | 아키텍처 불일치 또는 CPU에 AVX 없음 |
dyld: ..., Abort trap: 6 | macOS 13.0 미만 |
Exec format error (WSL) | WSL1 회귀 버그 |
Error: claude native binary not installed | npm postinstall 미실행 / optional 의존성 누락 |
npm error code ENOTEMPTY | 이전 패키지 디렉터리 잔존 |
API Error: 403 Request not allowed, OAuth error | 구독/역할/프록시 → 로그인 섹션 |
Could not load credentials from any providers 등 | Bedrock/Agent Platform/Foundry 자격 증명 |
진단 1: 네트워크
curl -sI https://downloads.claude.ai/claude-code-releases/latest # Windows PowerShell은 curl.exe
200이면 정상,403은 프록시/필터 또는 지역 미지원,5xx는 일시 장애.- 사내 프록시: 설치 전에
HTTP_PROXY,HTTPS_PROXY설정. did not return a version이면curl -s https://downloads.claude.ai/claude-code-releases/latest로 응답을 보고downloads.claude.ai를 허용하세요.
진단 2: PATH
- 네이티브 설치 위치: macOS/Linux
~/.local/bin/claude, Windows%USERPROFILE%\.local\bin\claude.exe. 설치기는 PATH 누락을Setup notes:에 알려줄 뿐 직접 고치지 않습니다. - 📝 VS Code 확장은 자체 CLI 사본을 내장하며 PATH에 추가하지 않습니다. 터미널에서 쓰려면 별도 설치가 필요합니다.
| 셸 | 추가할 파일 |
|---|---|
| Zsh (macOS 기본) | ~/.zshrc |
| Bash (Linux) | ~/.bashrc |
| Bash (macOS) | ~/.bash_profile (없고 ~/.bash_login/~/.profile이 있으면 그 파일) |
| PowerShell | User PATH에 %USERPROFILE%\.local\bin 추가([Environment]::SetEnvironmentVariable(...)) |
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
claude --version
- 그래도 안 되면: 이미 열린 터미널/에디터 내장 터미널은 옛 PATH 유지 → 새 창 또는 에디터 재시작.
echo가permission denied면ls -l ~/.zshrc로 소유자 확인 후chown또는chmod u+w.
진단 3: 중복 설치
- 확인:
which -a claude(Windowswhere.exe claude),~/.local/bin/claude(네이티브),~/.claude/local/(구버전 로컬 npm),npm -g ls @anthropic-ai/claude-code. - 하나만 남기세요. 권장은 네이티브 설치. 제거:
npm uninstall -g @anthropic-ai/claude-code,rm -rf ~/.claude/local,brew uninstall --cask claude-code,winget uninstall Anthropic.ClaudeCode.
진단 4: 디렉터리 권한 (macOS/Linux)
설치가 쓰는 위치: ~/.claude/downloads/, ~/.local/bin/, ~/.local/share/claude/, ~/.local/state/claude/, ~/.cache/claude/, ~/.claude.json. XDG_DATA_HOME/XDG_STATE_HOME/XDG_CACHE_HOME, CLAUDE_CONFIG_DIR를 설정하면 그 위치를 씁니다. 쓰기 불가면 sudo chown으로 소유권을 가져온 뒤 재설치합니다.
주요 설치 문제별 해결
| 상황 | 해결 |
|---|---|
| HTML 반환 | 몇 분 후 재시도 → 대안: brew install --cask claude-code / winget install Anthropic.ClaudeCode (⚠️ 이 둘은 기본적으로 자동 업데이트 안 됨) |
| Homebrew cask 없음/구버전 | brew update 후 설치. claude-code는 stable 채널(최신보다 약 1주 늦음), 최신은 claude-code@latest. brew list --cask | grep claude-code로 설치된 cask 확인 |
| TLS (Linux) | sudo apt-get install ca-certificates |
| TLS (PowerShell 5.1) | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 후 같은 창에서 설치 |
| TLS 검사 프록시 | macOS/Linux: CURL_CA_BUNDLE(스크립트 다운로드) + NODE_EXTRA_CA_CERTS(claude install·이후 API 요청)에 사내 CA PEM. Windows: CA를 Windows 인증서 저장소에 추가 |
| 폐기 확인 차단 (Windows CMD) | curl --ssl-revoke-best-effort -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd 또는 PowerShell 설치기/WinGet |
| 다운로드 끊김 | 최대 3회 자동 재시도(HTTP 오류 응답은 재시도 안 함), 10분 넘으면 타임아웃(재시도 안 함). claude update 재실행, HTTPS_PROXY, downloads.claude.ai 전체 다운로드 허용 요청 |
Release verification failed | 사유가 sidecar_fetch_로 시작하면 바로 재실행, 그 외는 나중에 재시도. 반복되면 신고 |
Windows The process cannot access the file | 다른 설치 창 종료·백신 스캔 대기 후 %USERPROFILE%\.claude\downloads 삭제하고 재설치 |
Windows 업데이트 후 claude.exe 없음 | 같은 폴더의 claude.exe.old.<타임스탬프> 최신본을 claude.exe로 이름 변경, 없으면 재설치 |
| 저메모리 Linux | 2GB 스왑 생성(fallocate/mkswap/swapon) 후 재설치. 실행에는 최소 4GB RAM |
| Docker에서 멈춤 | WORKDIR /tmp 지정 후 설치, Docker Desktop 메모리 증설 |
Raw mode is not supported | 2.1.246 미만에서 서버 관리형 설정 보안 승인 대화상자가 파이프 설치 중 뜨는 문제. 설치기 재실행(최신 install 사용). 단 forceRemoteSettingsRefresh 등 fail-closed 시작 구성에선 계속 실패 |
claude update/claude doctor 멈춤 | 셸 설정 파일 경로(~/.zshrc 등)가 디렉터리인 경우(2.1.214 미만). 치우거나 설치 스크립트로 업데이트 |
Windows에서 claude가 Desktop 앱 실행 | 구버전 Claude Desktop의 WindowsApps\Claude.exe가 우선 → Desktop 업데이트 |
requires either Git for Windows ... or PowerShell | PowerShell(C:\Windows\System32\WindowsPowerShell\v1.0\)을 PATH에 추가하거나 PowerShell 7/Git for Windows 설치 |
does not support 32-bit Windows | Windows PowerShell (x86) 대신 일반 Windows PowerShell 사용. [Environment]::Is64BitOperatingSystem이 False면 64비트 OS 필요 |
| musl/glibc 불일치 | ldd --version으로 확인 후 제거·재설치 |
Illegal instruction | uname -m 확인. AVX 없는 CPU(대략 2013년 이전, AVX 미전달 VM)는 네이티브 우회책 없음. 다른 설치 방식도 같은 바이너리 |
Bus error | 실행 중 바이너리가 잘리거나 삭제됨(네트워크 스토리지). 새 세션 시작, 네트워크 스토리지 설치 가이드 따르기 |
WSL1 Exec format error | wsl --set-version <DistroName> 2 권장. WSL1 유지 시 /lib64/ld-linux-x86-64.so.2로 감싸는 셸 함수 |
| WSL npm 문제 | npm config set os linux, sudo 금지. which node가 /mnt/c/면 Windows Node → Linux용 Node/nvm 설치. ⚠️ appendWindowsPath = false는 비권장 |
Git Bash 경로 지정 (Windows)
CLAUDE_CODE_GIT_BASH_PATH미설정 시 탐색 순서:C:\Program Files\Git,C:\Program Files (x86)\Git→ PATH의git옆bin\bash.exe. 실행 폴더 하위의node_modules/.venv/env경로에 있는 git은 보안상 건너뜁니다.
{ "env": { "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe" } }
- ⚠️ 파일명은
bash.exe,sh.exe,bash,sh만 허용(git-bash.exe는 무시되고 자동 탐지로 폴백,--debug에 경고). 그래도 안 되면 AppLocker/EDR 등에서claude.exe와 자식 프로세스(cmd.exe,bash.exe) 허용 요청.
npm 설치 특이사항
- npm 패키지는 플랫폼별 optional 의존성(예:
@anthropic-ai/claude-code-darwin-arm64)으로 네이티브 바이너리를 받고 postinstall로 교체합니다. - 원인: npm 12는 기본적으로 postinstall을 건너뜀,
--omit=optional/--no-optional/--ignore-optional/.npmrc optional=false,--ignore-scripts, 미지원 플랫폼, 사내 미러에 플랫폼 패키지 8종 누락. - 지원 플랫폼:
darwin-arm64,darwin-x64,linux-x64,linux-arm64,linux-x64-musl,linux-arm64-musl,win32-x64,win32-arm64. - npm 12 해결: 네이티브 설치로 전환(권장) 또는
npm config set "allow-scripts=@anthropic-ai/claude-code" --location=user(기존 값 덮어쓰니 먼저npm config get allow-scripts확인, 12.0.x면 12.1+로 업데이트) 후 재설치.EACCES면sudo대신 네이티브 설치로. ENOTEMPTY:"$(npm root -g)/@anthropic-ai/claude-code"와.claude-code-*잔존 디렉터리 삭제 후 재설치.- PowerShell 실행 정책:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, 또는npm.cmd/claude.cmd사용, 또는 PowerShell 설치기.
로그인·인증
| 상황 | 해결 |
|---|---|
| 원인 불명 | /logout → 종료 → claude로 재인증. 브라우저가 안 열리면 c로 OAuth URL 복사 |
That doesn't look like the full code / Invalid code | 가운데 # 포함 전체 코드 복사, 빨리 완료. SSH면 URL을 로컬 브라우저에서 열기 |
403 Request not allowed | Pro/Max/Ultra 구독 활성 확인, Console 사용자는 “Claude Code” 또는 “Developer” 역할, 프록시 확인 |
Claude Code access has not been granted for this account | Enterprise에서 Custom 역할인데 Claude Code를 주는 커스텀 역할이 없음 → Owner에게 역할 부여 요청 후 재로그인 |
활성 구독인데 This organization has been disabled | ⚠️ 예전 ANTHROPIC_API_KEY가 구독보다 우선 적용(-p 모드에선 항상 사용). 변수와 셸 프로필 항목 삭제, /status로 확인 (013) |
| WSL2/SSH/컨테이너 OAuth 실패 | 터미널의 로그인 URL을 로컬 브라우저에서 열고 표시된 코드를 Paste code here에 붙여넣기. 붙여넣기 안 되면 claude auth login(stdin). WSL2는 BROWSER에 Windows 브라우저 경로 |
| 토큰 만료 반복 | /login, 시스템 시계 확인. 병렬 세션은 로그인을 공유하고 한 프로세스만 갱신 |
| macOS Keychain 쓰기 실패 | 평문 ~/.claude/.credentials.json으로 저장됨. claude doctor의 macOS Keychain is not writable 경고 확인 → security unlock-keychain ~/Library/Keychains/login.keychain-db → 필요시 Keychain 암호 재동기화 → /logout 후 /login (⚠️ MCP 로그인·플러그인 비밀값도 삭제됨) |
네트워크 홈 디렉터리에서 401 | 파일시스템/쿼터가 가득 차 .credentials.json 저장 실패(Login successful이 떠도). 공간 확보 후 재로그인 |
| 클라우드 자격 증명 | Bedrock: aws sts get-caller-identity / Agent Platform: ANTHROPIC_VERTEX_PROJECT_ID, CLOUD_ML_REGION 확인 후 gcloud auth application-default login / Foundry: ANTHROPIC_FOUNDRY_API_KEY 또는 az login. IDE 확장에서만 안 되면 IDE가 셸 환경을 상속 못 한 것 |
관련: Bedrock, Agent Platform, Foundry, 네트워크 설정, 설치
그래도 안 되면
- GitHub 이슈(OS, 설치 명령, 전체 오류 출력 포함) 2.
claude doctor3. 세션이 뜨면/feedback4. 계정 문제는 claude.ai(Console은 platform.claude.com)의 Get help
실무 관점
- 사내 배포 시 가장 흔한 막힘은 TLS 검사 프록시입니다.
downloads.claude.ai허용, 프록시 변수,NODE_EXTRA_CA_CERTS용 사내 CA PEM을 표준 개발 환경 이미지/온보딩 문서에 미리 넣어 두세요. - 설치 방식은 하나로 통일하세요(네이티브 권장). Homebrew/WinGet은 자동 업데이트가 기본 꺼짐, npm 12는 postinstall 문제가 있어 운영 부담이 큽니다.
- 사내 npm 미러를 쓴다면 메타 패키지와 플랫폼 패키지 8종을 모두 미러링해야 합니다.
- 오래된
ANTHROPIC_API_KEY가 셸 프로필에 남아 있으면 의도치 않게 API 키 과금으로 동작할 수 있습니다. 온보딩 시/status확인을 습관화하세요. - Keychain 실패 시 자격 증명이 평문 파일로 저장된다는 점은 보안 점검 항목입니다.
- 소형 VM(CI 러너, VPS)은 메모리(설치 약 512MB, 실행 최소 4GB)와 AVX 지원 여부를 먼저 확인하세요.