[BUG] installer dns resolution fails due to hardcoded dns server

Status Open
Reported on v2.1.197
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Jul 1, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude code installer fails on linux 7.0.14-arch1-1 as it attempts to resolve dns using localhost:53

What Should Happen?

instead of using non-existing dns server localhost:53 it should use the system resolver

Error Messages/Logs

Installation failed

Failed to fetch version from https://downloads.claude.ai/claude-code-releases/latest after 3 attempt(s):
 getaddrinfo ETIMEOUT downloads.claude.ai

Steps to Reproduce

  1. curl -fsSL https://claude.ai/install.sh | bash

Claude Model

_No response_

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude-2.1.197-linux-x64

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Xterm

Additional Information

_No response_

View original on GitHub ↗

4 Comments

Pyrolistical · 2 months ago

i figured it out with strace -e trace=network -f ./claude-2.1.197-linux-x64 install which showed attempts to connect to localhost:53, at which time i spun up a local dns proxy and it worked.

github-actions[bot] · 2 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/71699
  2. https://github.com/anthropics/claude-code/issues/13498

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Pyrolistical · 2 months ago

this might be the same as #71699 but that one seems more complicated than what my issue is. my issue should be more general that everybody hits. not related to #13498

bcherny collaborator · 11 days ago

Thanks for the report — I dug into this on Linux with the current release (verified on 2.1.233 and 2.1.237).

What I found: the binary isn't hardcoded to localhost:53 — it uses the nameservers listed in /etc/resolv.conf (verified by tracing its DNS traffic: with nameserver 8.8.8.8 it queries 8.8.8.8 and installs fine). But unlike curl, its resolver reads only /etc/resolv.conf — it doesn't go through glibc/NSS (e.g. nss-resolve/systemd-resolved or mDNS). When /etc/resolv.conf is empty, missing, or points at a stub that isn't listening, it falls back to 127.0.0.1:53, which reproduces your exact error: getaddrinfo ETIMEOUT downloads.claude.ai after 3 attempts.

That also explains why the install script's own curl downloads succeed on your machine while the downloaded binary then fails — common on Arch when name resolution is handled outside resolv.conf.

Verdict: confirmed — the installed binary should honor the full system resolver configuration, and we're looking into it.

Workaround until then: make sure /etc/resolv.conf lists a reachable nameserver — with systemd-resolved, ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf, or point it at your router/DNS server directly.

🤖 Generated with Claude Code