gemini-cli - ✅(Solved) Fix Ripgrep is not detected on Linux even when installed globally [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26541Fetched 2026-05-06 06:35:39
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1labeled ×1

Root Cause

Root Cause: The current implementation in packages/core/src/tools/ripGrep.ts only looks for bundled binaries in internal vendor/ripgrep paths. If these bundled files are missing, the CLI ignores the global system binary.

Fix Action

Fixed

PR fix notes

PR #26536: feat(core): add system-wide fallback for ripgrep detection

Description (problem / solution / changelog)

Fixes #26541

Description: This PR introduces a fallback mechanism for Ripgrep detection on Linux and Windows.

Currently, the CLI strictly looks for a bundled binary within internal vendor/ripgrep paths. If the binary is missing (e.g., due to specific installation environments), the CLI falls back to the slower GrepTool, even if a global ripgrep (rg) is available in the system $PATH.

Changes:

  • Updated getRipgrepPath in packages/core/src/tools/ripGrep.ts to check for rg using which (Linux/macOS) or where (Windows) if the bundled binary is not found.
  • Verified that the logic correctly identifies the global binary and uses it, eliminating the "Ripgrep is not available" warning and improving performance.

Testing:

  • Passed all existing unit tests in packages/core/src/tools/ripGrep.test.ts.
  • Verified manually by removing bundled binaries and confirming the CLI successfully falls back to the system's rg binary.

Changed files

  • packages/core/src/tools/ripGrep.test.ts (modified, +12/-1)
  • packages/core/src/tools/ripGrep.ts (modified, +10/-1)
RAW_BUFFERClick to expand / collapse

What happened?

The Gemini CLI fails to utilize ripgrep (rg) on Linux even if it is available in the system's $PATH. It incorrectly reports "Ripgrep is not available. Falling back to GrepTool."

Root Cause: The current implementation in packages/core/src/tools/ripGrep.ts only looks for bundled binaries in internal vendor/ripgrep paths. If these bundled files are missing, the CLI ignores the global system binary.

What did you expect to happen?

The CLI should check for the system-wide ripgrep binary if the bundled version is not found, ensuring high-performance search is available.

Client information

Platform: Linux (Fedora) Gemini CLI Version: 0.40.1

Login information

Google Account (OAuth personal)

Anything else we need to know?

I have already submitted a Pull Request fixing this issue here: https://github.com/google-gemini/gemini-cli/pull/26536

extent analysis

TL;DR

The Gemini CLI can be fixed to utilize the system-wide ripgrep binary by modifying the ripGrep.ts file to check for the system binary if the bundled version is not found.

Guidance

  • The current implementation only looks for bundled binaries in internal vendor/ripgrep paths, ignoring the global system binary.
  • To fix this, the ripGrep.ts file needs to be modified to check for the system-wide ripgrep binary if the bundled version is not found.
  • The submitted Pull Request (https://github.com/google-gemini/gemini-cli/pull/26536) likely contains the necessary changes to resolve this issue.
  • Until the Pull Request is merged, users can try applying the changes manually or wait for an updated version of the Gemini CLI.

Notes

The fix relies on the Pull Request being merged and released in a future version of the Gemini CLI. Users on Linux (Fedora) with version 0.40.1 are affected.

Recommendation

Apply the workaround by manually applying the changes from the submitted Pull Request or wait for an updated version of the Gemini CLI that includes the fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - ✅(Solved) Fix Ripgrep is not detected on Linux even when installed globally [1 pull requests, 1 comments, 2 participants]