tar not found #1528

Closed
opened 2026-02-16 17:31:24 -05:00 by yindo · 2 comments
Owner

Originally created by @johnlepikhin on GitHub (Aug 29, 2025).

Originally assigned to: @thdxr on GitHub.

Opencode doesn't use $PATH to find tar binary. Instead, hardcoded search paths are used:

[pid 32211] 16:51:53.256383 stat("/usr/bin/tar", 0x7ffd20d98280) = -1 ENOENT (No such file or directory)
[pid 32211] 16:51:53.256402 stat("/bin/tar", 0x7ffd20d98280) = -1 ENOENT (No such file or directory)

This will never work on systems like NixOS or GuixSD. Such type of Linux distributions doesn't have /usr/bin at all.

$ which tar
/run/current-system/profile/bin/tar
Originally created by @johnlepikhin on GitHub (Aug 29, 2025). Originally assigned to: @thdxr on GitHub. Opencode doesn't use $PATH to find tar binary. Instead, hardcoded search paths are used: ``` [pid 32211] 16:51:53.256383 stat("/usr/bin/tar", 0x7ffd20d98280) = -1 ENOENT (No such file or directory) [pid 32211] 16:51:53.256402 stat("/bin/tar", 0x7ffd20d98280) = -1 ENOENT (No such file or directory) ``` This will never work on systems like NixOS or GuixSD. Such type of Linux distributions doesn't have /usr/bin at all. ``` $ which tar /run/current-system/profile/bin/tar ```
yindo closed this issue 2026-02-16 17:31:24 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 29, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2301: Similar issue about binary detection - OpenCode doesn't check if system binaries like unzip are installed properly

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 29, 2025): This issue might be a duplicate of existing issues. Please check: - #2301: Similar issue about binary detection - OpenCode doesn't check if system binaries like unzip are installed properly Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1528