[BUG] vendor/ripgrep/arm64-darwin/rg linked against absent /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib

Resolved 💬 4 comments Opened Dec 19, 2025 by breun Closed Feb 14, 2026

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?

While attempting to add Claude Code to MacPorts via NPM, MacPorts prints this warning about a broken rg binary:

Could not open /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib: Error opening or reading file (referenced from /opt/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg)

This is confirmed by otool -L:

❯ otool -L /opt/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg
/opt/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg:
        /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib (compatibility version 14.0.0, current version 14.0.0)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib indeed doesn't exist on my machine. I don't have Homebrew installed (and I also don't plan to install it).

What Should Happen?

The binaries installed by Claude Code should not depend on Homebrew libraries.

Error Messages/Logs

Could not open /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib: Error opening or reading file (referenced from /opt/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg)

Steps to Reproduce

  1. Create a temporary directory: mkdir /tmp/claude-code
  2. Install Claude Code in the temporary directory: npm install -g --prefix=/tmp/claude-code @anthropic-ai/claude-code
  3. Run otool -L /tmp/claude-code/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.73 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗