Installing uv via Homebrew on Apple Silicon Mac fails with 'C compiler cannot create executables' during source compilation
Installing uv via Homebrew on an Apple Silicon Mac fails with 'C compiler cannot create executables' during source compilation. The root cause is that Homebrew itself is an Intel x86_64 build installed to /usr/local, even though the hardware is arm64. When brew install uv runs, Homebrew's package index doesn't find a precompiled arm64 binary (because it is searching the Intel package mirror), and falls back to building from source. This requires compiling Rust and LLVM dependencies. If Command Line Tools are missing or broken, the build fails immediately.
Verify the mismatch with which brew (shows /usr/local/bin) and uname -m (shows arm64). The fix is to bypass Homebrew and use uv's official installer, which auto-detects your CPU architecture and installs the native arm64 build: curl -LsSf https://astral.sh/uv/install.sh | sh. This installs to ~/.local/bin with no compilation needed. Long-term: install native Homebrew to /opt/homebrew (which has precompiled arm64 packages) following the official Homebrew installation instructions.