Termux support 🙏 #692

Open
opened 2026-02-16 17:27:55 -05:00 by yindo · 7 comments
Owner

Originally created by @keeganmccallum on GitHub (Jul 14, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Originally created by @keeganmccallum on GitHub (Jul 14, 2025). Originally assigned to: @adamdotdevin on GitHub.
Author
Owner

@paperbenni commented on GitHub (Nov 15, 2025):

Please I want this!!

@paperbenni commented on GitHub (Nov 15, 2025): Please I want this!!
Author
Owner

@ferdinandyb commented on GitHub (Dec 17, 2025):

@rekram1-node Do you guys have any plans for supporting termux?

@ferdinandyb commented on GitHub (Dec 17, 2025): @rekram1-node Do you guys have any plans for supporting termux?
Author
Owner

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

we have had some discussions, if claude code works on termux opencode should be able to as well

havnt looked into it enough to see what the issue is

@rekram1-node commented on GitHub (Dec 17, 2025): we have had some discussions, if claude code works on termux opencode should be able to as well havnt looked into it enough to see what the issue is
Author
Owner

@bign8 commented on GitHub (Jan 21, 2026):

Not sure if this is the same issue for everyone, but this is the error I see in Termux:

~ $ curl -fsSL https://opencode.ai/install | bash
Installed version: .

Installing opencode version: 1.1.30
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%

                                 ▄
█▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
█░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀  ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀


OpenCode includes free models, to start:

cd <project>  # Open directory
opencode      # Run command

For more information visit https://opencode.ai/docs


~ $ opencode
bash: /data/data/com.termux/files/home/.opencode/bin/opencode: cannot execute: required file not found
~ $

Or

~ $ npm i -g opencode-ai@latest

> opencode-ai@1.1.34 postinstall
> bun ./postinstall.mjs || node ./postinstall.mjs

sh: 1: bun: not found
Failed to setup opencode binary: Could not find package opencode-android-arm64: Cannot find module 'opencode-android-arm64/package.json'
Require stack:
- /data/data/com.termux/files/usr/lib/node_modules/opencode-ai/postinstall.mjs
npm error code 1
npm error path /data/data/com.termux/files/usr/lib/node_modules/opencode-ai
npm error command failed
npm error command sh -c bun ./postinstall.mjs || node ./postinstall.mjs
npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2026-01-24T06_11_52_133Z-debug-0.log

Even bun had a similar issue

~ $ curl -fsSL https://bun.com/install | bash
bun was installed successfully to ~/.bun/bin/bun

Added "~/.bun/bin" to $PATH in "~/.bash_profile"

To get started, run:

  source /data/data/com.termux/files/home/.bash_profile
  bun --help
~ $ source ~/.bash_profile
~ $ bun -h
bash: /data/data/com.termux/files/home/.bun/bin/bun: cannot execute: required file not found
~ $

update Not certain, but this looks suspicious:
(Termux has weird fs mappings, so lib isn't necessarily at /)

~ $ strings $(which bun) | head -n 1
/lib/ld-linux-aarch64.so.1
~ $ strings $(which opencode) | head -n 1
/lib/ld-linux-aarch64.so.1
~ $ pwd
/data/data/com.termux/files/home
~ $ ls /lib
ls: cannot access '/lib': No such file or directory
~ $

(Sorry, idk if this is helpful or just noise. It's been a while since I've been up to speed in the npm world, and I'm far from an expert in termux. Just trying to help)

@bign8 commented on GitHub (Jan 21, 2026): Not sure if this is the same issue for everyone, but this is the error I see in Termux: ``` ~ $ curl -fsSL https://opencode.ai/install | bash Installed version: . Installing opencode version: 1.1.30 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%   ▄ █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█ █░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀ ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ OpenCode includes free models, to start: cd <project> # Open directory opencode # Run command For more information visit https://opencode.ai/docs ~ $ opencode bash: /data/data/com.termux/files/home/.opencode/bin/opencode: cannot execute: required file not found ~ $ ``` Or ``` ~ $ npm i -g opencode-ai@latest > opencode-ai@1.1.34 postinstall > bun ./postinstall.mjs || node ./postinstall.mjs sh: 1: bun: not found Failed to setup opencode binary: Could not find package opencode-android-arm64: Cannot find module 'opencode-android-arm64/package.json' Require stack: - /data/data/com.termux/files/usr/lib/node_modules/opencode-ai/postinstall.mjs npm error code 1 npm error path /data/data/com.termux/files/usr/lib/node_modules/opencode-ai npm error command failed npm error command sh -c bun ./postinstall.mjs || node ./postinstall.mjs npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2026-01-24T06_11_52_133Z-debug-0.log ``` Even bun had a similar issue ``` ~ $ curl -fsSL https://bun.com/install | bash bun was installed successfully to ~/.bun/bin/bun Added "~/.bun/bin" to $PATH in "~/.bash_profile" To get started, run: source /data/data/com.termux/files/home/.bash_profile bun --help ~ $ source ~/.bash_profile ~ $ bun -h bash: /data/data/com.termux/files/home/.bun/bin/bun: cannot execute: required file not found ~ $ ``` _update_ Not certain, but this looks suspicious: (Termux has weird fs mappings, so lib isn't necessarily at /) ``` ~ $ strings $(which bun) | head -n 1 /lib/ld-linux-aarch64.so.1 ~ $ strings $(which opencode) | head -n 1 /lib/ld-linux-aarch64.so.1 ~ $ pwd /data/data/com.termux/files/home ~ $ ls /lib ls: cannot access '/lib': No such file or directory ~ $ ``` (Sorry, idk if this is helpful or just noise. It's been a while since I've been up to speed in the npm world, and I'm far from an expert in termux. Just trying to help)
Author
Owner

@danielpcampagna commented on GitHub (Feb 4, 2026):

I could do this within proot-distro, but with a lazy start, and it just worked once. :(

Image

@danielpcampagna commented on GitHub (Feb 4, 2026): I could do this within `proot-distro`, but with a lazy start, and it just worked once. :( ![Image](https://github.com/user-attachments/assets/bbad8ae2-a4f1-4678-8f14-fda8b37c5b14)
Author
Owner

@danielpcampagna commented on GitHub (Feb 4, 2026):

Following Issue #3143

@danielpcampagna commented on GitHub (Feb 4, 2026): Following [Issue #3143](https://github.com/anomalyco/opencode/issues/3143)
Author
Owner

@enesofbyte commented on GitHub (Feb 4, 2026):

@danielpcampagna please use "opencode web" to run opencode. It should say something like "anthropic-auth module not found". If this happens go to that directory and run "npm install". I do not remember which directory it is but it should say it there (might be [.config/opencode/node_modules]). If the same problem appears with another module, just do the fix again. you may need to install opencode with npm.

@enesofbyte commented on GitHub (Feb 4, 2026): @danielpcampagna please use "opencode web" to run opencode. It should say something like "anthropic-auth module not found". If this happens go to that directory and run "npm install". I do not remember which directory it is but it should say it there (might be [.config/opencode/node_modules]). If the same problem appears with another module, just do the fix again. you may need to install opencode with npm.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#692