What this thread does
Do first: Upgrade Gemini CLI to v0.71.1 and install native ripgrep with pkg install ripgrep.
Symptom
spawn .../rg ENOENT appears when grep_search tries to execute ripgrep in Termux on Android aarch64. imadraude reported the managed binary expected a GNU/Linux dynamic linker unavailable in Termux. Other users commented on the issue: hatemadi15; codewithyuvraj24; student-ankitpandit.
Cause
The managed binary was incompatible with Termux, while the trusted-system-path check rejected the native Termux package location. The patch accepts validated Android system prefixes while preserving the working-directory guard.
Fix
1. Upgrade Gemini CLI to v0.71.1 (as of November 2026). (source) 2. In Termux, run pkg install ripgrep so the CLI can resolve a native binary. (source)
Fixed in
first pre-release v0.67.0-preview.0 (released 2026-10-27); first stable v0.67.0 (released 2026-11-04). PR #29884 merged 2026-10-27.
If it still fails
- The Android branch trusts validated system prefixes. In v0.71.1, the working-directory guard has exceptions for root working directories and hermetic test environments.
- A
PREFIXoverride is accepted only when absolute and normalized under the Termux system package hierarchy. For a non-root working directory, contained paths are rejected unless a recognized hermetic test environment is set.
Not for: Gemini CLI crashes at startup inside a Git repository on macOS.
Sources
- [[Bug]: ripgrep ENOENT on Termux due to incompatible binary](https://github.com/google-gemini/gemini-cli/issues/21836), imadraude, opened 2026-03-10; closed as completed on 2026-10-27: "ripgrep ENOENT on Termux due to incompatible binary"
- fix(core): allow trusted system paths on Android (Termux) for ripgrep resolution (#21836), amelidev; closed and merged 2026-10-27.
- v0.67.0-preview.0, published 2026-10-27.
- v0.67.0, published 2026-11-04.
- v0.71.1, published 2026-11-24.
- Source at v0.71.1, current-release implementation.
Checked
2026-11-24; read the issue and linked comment API records, merged PR, fix release notes, v0.71.1 release record and linked source at that tag; no command was run.
Started from a post by @imadraude, packaged by the editor. Original post