◉ANTIGRAVITY LABJP
Articles/Antigravity Basics
◉ Antigravity Basics/2026-10-24Beginner

The File Is Right There, but Linux Says "No Such File" — Check the Interpreter, Not the Path

When agy's grep search fails on Linux and the log says "no such file or directory" for a file that clearly exists, the culprit is the ELF interpreter. Here is how to confirm it, reproduce it, and work around it for now.

antigravity469linuxripgrep4troubleshooting123agy6

The log says the bundled ripgrep can't be found. Yet ls shows it sitting in ~/.cache/antigravity/bin/, executable bit and all. A file that exists but is reported as missing is the kind of thing that stops my hands on the keyboard for a minute.

A report on the official repository describes exactly this on Linux: the agent's code search fails, and the only clue is a "no such file or directory" error. I'll use that report as a starting point and write down how I read this class of error, as an indie developer who hops between machines more often than I'd like.

What the report says

The reporter runs Ubuntu 26.04 LTS (x86_64, glibc 2.43). agy extracts ripgrep into ~/.cache/antigravity/bin/ and tries to run it. The log shows:

ripgrep resolved to /home/<user>/.cache/antigravity/bin/rg_embedded-... (embedded copy)
ripgrep at /home/<user>/.cache/antigravity/bin/rg_embedded-... could not be executed (fork/exec ...: no such file or directory)

Running file on the binary shows its interpreter is /usr/grte/v5/lib64/ld-linux-x86-64.so.2. That path doesn't exist on a typical Linux system. The report's reading is that the bundled binary was built against a loader location specific to its build environment.

The reporter saw the same behavior on 1.1.27, 1.2.1, 1.2.2 and 1.2.3. When I checked on October 24, the issue was still open with no comments. I can't tell you whether later versions fix it, so please verify on your own install.

The message isn't about the file you ran

A dynamically linked executable doesn't start by itself. Its header embeds the absolute path of an "interpreter" — the dynamic loader — and the kernel starts that loader first. If the path doesn't exist, the kernel returns ENOENT, "No such file or directory".

So the error is about the loader named inside the file, not the file you tried to run. Bash words it as "cannot execute: required file not found". A Go program shows fork/exec: no such file or directory; Python raises FileNotFoundError. Same root cause.

Reproducing it by hand

I wanted to see it with my own eyes. To be clear, this does not reproduce agy itself; it only demonstrates the general mechanism with a tiny C program whose interpreter doesn't exist.

printf '#include <stdio.h>\nint main(){puts("hello");return 0;}\n' > d.c
gcc -o demo_rg d.c -Wl,--dynamic-linker=/usr/grte/v5/lib64/ld-linux-x86-64.so.2
$ ls -l demo_rg
-rwxr-xr-x 1 root root 15960 ... demo_rg      # exists, executable
 
$ ./demo_rg
bash: ./demo_rg: cannot execute: required file not found
 
$ readelf -l demo_rg | grep -i interpreter
  [Requesting program interpreter: /usr/grte/v5/lib64/ld-linux-x86-64.so.2]
 
$ /lib64/ld-linux-x86-64.so.2 ./demo_rg
hello                                         # works via the system loader

This matches what the reporter describes: handing the binary to the system loader makes it run.

One thing surprised me: ldd ./demo_rg exits with 0 and prints its dependencies without complaint. A clean ldd is not proof that the binary can start. file or readelf is the more reliable check.

A short diagnostic routine

Before suspecting the path spelling, check the interpreter:

  1. Note the binary path from the log.
  2. Read the interpreter line from file or readelf.
  3. See whether that path exists on your machine.
  4. Pass the binary to the system loader and see whether it runs.
BIN=~/.cache/antigravity/bin/rg_embedded-*   # replace the wildcard with the real file name
 
file $BIN | grep -o 'interpreter [^,]*'
readelf -l $BIN | grep -i 'program interpreter'
 
ls -l /usr/grte/v5/lib64/ld-linux-x86-64.so.2
 
# your system's own loader, for comparison
readelf -l /bin/ls | grep -i 'program interpreter'
 
/lib64/ld-linux-x86-64.so.2 $BIN --version

If step 3 says "missing" and step 4 says "runs", the binary is fine and only the loader location is wrong.

Same message, different causes

"No such file" shows up for other reasons too. This is the order I usually check them in:

SuspectHow to checkWhat you'd see
Interpreter path doesn't existRead it with readelf -l, then ls itRuns when passed to the loader
Wrong CPU architectureCompare file output (x86-64 vs aarch64) with uname -mFails even via the loader
Mounted noexecCheck mount options of the cache directory with mountUsually "Permission denied"
Missing execute bitCheck the x bit with ls -l"Permission denied"

This is my own checking order, and there may be exceptions depending on your environment.

A workaround, and where I draw the line

The reporter worked around it with a symlink from the missing path to the system loader. I confirmed the same trick works on my demo binary.

# check your loader's actual location first (x86_64 example)
sudo mkdir -p /usr/grte/v5/lib64
sudo ln -s /lib64/ld-linux-x86-64.so.2 /usr/grte/v5/lib64/ld-linux-x86-64.so.2
 
# to undo
sudo rm -r /usr/grte

This is a workaround, not a fix. You're adding a link under a system directory that nobody planned for. I wouldn't do it on a shared machine or anywhere you need approval to change system files.

Also, the reporter notes that installing a system ripgrep (/usr/bin/rg) didn't help, because agy picks the embedded copy first. Tweaking PATH won't save you here, which is worth knowing before you spend an evening on it.

On my own machines, I try to write down when a temporary workaround should come out. One line is enough: the date I made it and the condition for removing it.

Every workaround gets an exit condition the moment it's created. I try to keep that rule even on rushed nights.

What to try next

Run file once and read the interpreter line. If that path doesn't exist on your system, you're looking at this exact problem. If it does exist and the binary still won't start, look at other causes: architecture mismatch, permissions, or a filesystem mounted noexec.

How you wait for a fix is up to you: add the link, wait for an official fix, or live without search in that environment for now. Whichever you choose, I'd keep an eye on the issue page.

Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

◉ Antigravity2026-10-20
NoClassDefFoundError on Old Android Devices Only — Four Clues I Gather Before Handing It to an Agent
Everything works on new phones, but Android 6 devices crash. Using a Supplier NoClassDefFoundError that appeared after a Glide update, this note covers the order of diagnosis, the coreLibraryDesugaring setup, and what to prepare before asking an agent to investigate.
◉ Antigravity2026-10-17
Build the Environment Note Before You Write the Question — A Small Shell Script for Posts That Get Replies
A small shell script that gathers your OS, tool versions, and the tail of a log into one note you can paste into a forum post or issue, with secrets masked. Here is what it catches, what it misses, and the three lines only you can write.
◉ Antigravity2026-09-15
When an agent ends without a reason, I check the page's character encoding first
A page handed to ReadURL can end an Antigravity agent with nothing but Agent execution terminated. Here is how I tell those pages apart before handing them over, and why I now fetch and re-encode first.